CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
可用分押宝游戏火热进行中... 专题改版:Java Web 专题
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  .NET技术 >  C#

propertyGrid又一疑问: 如何设定属性组(category)的排列顺序?

楼主jackiedlh(我思考,我存在)2004-09-03 17:42:25 在 .NET技术 / C# 提问

我的一个类有一些实行很重要,需要用户首先注意和修改(如归纳在Initial组中),如何做到使列在首位? 问题点数:50、回复次数:4Top

1 楼jamzh(Show me the money!!!)回复于 2004-09-03 18:12:45 得分 1

不懂,帮你顶  
  Top

2 楼Jim3(Jim)回复于 2004-09-03 18:20:20 得分 1

好象是按照字母顺序吧  
   
  关注一下Top

3 楼jackiedlh(我思考,我存在)回复于 2004-09-06 09:16:34 得分 0

都没有讲到点子上Top

4 楼Jim3(Jim)回复于 2004-09-06 13:30:31 得分 48

搜索到的资料  
  链接:  
   
  http://www.dotnet247.com/247reference/msgs/34/172995.aspx  
   
  Robert   Hooker    
  Hi   all,  
   
  I'm   looking   for   a   way   to   sort/order   the   Category   text   items   in   a   property  
  grid.   The   grids   sort   the   categories   by   alpha   when   the   catergories   are  
  displayed.  
  Does   anyone   at   Microsoft   (or   anywhere   else)   no   of   a   way   that   we   can   override  
  that   sort/order   for   the   category   text?  
   
  [   We   have   implemented   a   fair   amount   of   code   to   sort/order   individual   items  
  in   a   property   grid   the   way   we   want   them,   but   haven't   found   any   at   all   yet   to  
  do   the   same   for   Category   text...]  
   
  Rob.  
   
     
    Reply   to   this   message...    
     
       
            Nicholas   Paldino   [.NET/C#   MVP]    
  Robert,  
   
  I   don't   believe   there   is   a   way   to   do   this.   The   only   thing   that   I   could  
  find   that   indicates   you   might   be   able   to   do   this   is   the   PropertySort  
  property.   If   you   set   it   to   none,   it   says   that   the   properties   are   displayed  
  in   the   order   that   they   are   received   from   the   type   descriptor.   You   might   be  
  able   to   create   a   proxy   type   descriptor   between   your   object   and   the  
  propertygrid,   which   would   then   return   not   only   the   properties   in   the   correct  
  order,   but   the   properties   with   the   categories   in   the   order   that   you   want  
  them   in.  
   
  Hope   this   helps.  
   
  --  
  -   Nicholas   Paldino   [.NET/C#   MVP]  
  -   Click   here   to   reveal   e-mail   address  
   
  "Robert   Hooker"   <Click   here   to   reveal   e-mail   address>   wrote   in   message  
  news:Click   here   to   reveal   e-mail   address...  
  [Original   message   clipped]  
   
     
    Reply   to   this   message...    
     
       
            Robert   Hooker    
  We've   tried   this   -   unfortunately   it   doesn't   work.   When   we   return   the  
  PropertyDescriptorCollection   collection,   it   is   correctly   sorted   the   way   we  
  want   it   (categories   and   all),   but   the   propertygrid   simply   ignores   that   order  
  for   the   category   texts.   It   *does*   respect   the   order   for   individual  
  properties   within   each   category   though...  
   
  "Nicholas   Paldino   [.NET/C#   MVP]"   <Click   here   to   reveal   e-mail   address>   wrote  
  in   message   news:Click   here   to   reveal   e-mail   address...  
  [Original   message   clipped]  
   
     
    Reply   to   this   message...    
     
       
            Ryan   McFarren    
  I   think   I've   exhausted   the   possibilities   trying   to   get   around   this   BUG.   For   now,   we   are   preceding   the   category   names   with   numbers   to   get   the   order   we   want.   For   example,   "1   General",   "2   Advanced".  
   
  --------------------------------  
  From:   Ryan   McFarren  
     
    Reply   to   this   message...    
     
     
     
     
  Top

相关问题

  • DBGrid的Options属性的疑问
  • listbox的SORT属性到底按什么顺序排序?
  • 用Transformer转XML时属性的顺序问题.
  • 关于PropertyGrid属性排序和动态加载属性。
  • Response对象中的Expires属性的一点疑问
  • 关于文件属性的几个疑问,
  • 关于PictureBox的透明属性的疑问
  • 关于控件的ID和NAME属性的疑问?
  • 一段代码,执行顺序的疑问.
  • 用propertygrid如何控制只显示某些属性和自定义属性?

关键词

  • .net
  • c#
  • propertygrid
  • category
  • reply
  • way
  • sorted
  • order
  • message
  • are

得分解答快速导航

  • 帖主:jackiedlh
  • jamzh
  • Jim3
  • Jim3

相关链接

  • CSDN .NET频道
  • .NET类图书
  • C#类图书
  • .NET类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
世纪乐知(北京)网络技术有限公司 版权所有, 京 ICP 证 020026 号
北京创新乐知广告有限公司 提供技术支持
Copyright © 2000-2007, CSDN.NET, All Rights Reserved
GongshangLogo