社区
C#
帖子详情
propertyGrid如何设定属性组(category)的排列顺序和组内的排序
king_eagle
2010-05-14 03:48:42
也就是说我想我类里面定义属性的顺序就是要显示的顺序。而不需要给我按照拼音排序。
...全文
1707
8
打赏
收藏
propertyGrid如何设定属性组(category)的排列顺序和组内的排序
也就是说我想我类里面定义属性的顺序就是要显示的顺序。而不需要给我按照拼音排序。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
8 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
zouxudong1
2011-10-14
打赏
举报
回复
1
把PropertyGrid控件的PropertySort设置为NoSort可使属性以其被截取時的顺序显示。
lxw2100
2011-06-28
打赏
举报
回复
此问题如何解决的?有无下文?
tangjuncheng1986
2010-06-22
打赏
举报
回复
我也遇到同样的问题 ,希望能解决啊
理不完的逻辑
2010-05-14
打赏
举报
回复
友情帮顶 学习~!
menglingjun
2010-05-14
打赏
举报
回复
头一次听说PropertyGrid,从未用过。。
king_eagle
2010-05-14
打赏
举报
回复
#region 设置属性
private string flightDate;
[CategoryAttribute("组1:航班信息"), ReadOnlyAttribute(true), DisplayName("航班日期")]
public string FlightDate
{
get
{
return flightDate;
}
set
{
flightDate = value;
}
}
private string flightNO;
[CategoryAttribute("组1:航班信息"), ReadOnlyAttribute(true), DisplayName("航班号")]
public string FlightNO
{
get { return flightNO; }
set { flightNO = value; }
}
private string ac_Type;
[CategoryAttribute("组1:航班信息"), ReadOnlyAttribute(true), DisplayName("机型")]
public string Ac_Type
{
get { return ac_Type; }
set { ac_Type = value; }
}
private string ac_Reg;
[CategoryAttribute("组1:航班信息"), ReadOnlyAttribute(true), DisplayName("机号")]
public string Ac_Reg
{
get { return ac_Reg; }
set { ac_Reg = value; }
}
private string dep_Airport;
[CategoryAttribute("组2:起飞站信息"), ReadOnlyAttribute(true), DisplayName("机场")]
public string Dep_Airport
{
get { return dep_Airport; }
set { dep_Airport = value; }
}
private string dep_Std;
[CategoryAttribute("组2:起飞站信息"), ReadOnlyAttribute(true), DisplayName("计飞")]
public string Dep_Std
{
get { return dep_Std; }
set { dep_Std = value; }
}
private string arr_Airport;
[CategoryAttribute("组3:到达站信息"), ReadOnlyAttribute(true), DisplayName("机场")]
public string Arr_Airport
{
get { return arr_Airport; }
set { arr_Airport = value; }
}
#endregion
像这样的,我有什么办法可以不按照它默认的拼音排序呢?包括属性组。
zzx509
2010-05-14
打赏
举报
回复
啊,不会。
你要是够牛的话自己写个PropertyGrid。
threenewbee
2010-05-14
打赏
举报
回复
没有办法。
可以尝试给属性分组。
如何让C#的
Property
Grid
的
Ca
tegory
按照类的定义
顺序
进行
排序
?
如何让C#的
Property
Grid
的
Ca
tegory
按照类的定义
顺序
进行
排序
?
关于
Property
Grid
控件的
排序
问题
前些天,由于在项目中需要用到
Property
Grid
这个控件,展现其所在控件的某些
属性
,由于有些控件的
属性
较多,不易浏览,而且
Property
Grid
的
排序
默认的按照字母的
顺序
排列
的,这样导致在在某些
属性
想要排在第一位非常不...
c#
property
grid
根据
Ca
tegory
Attribute
排序
c#
property
grid
根据
Ca
tegory
Attribute
排序
[
Ca
tegory
Attribute("巷道名称"),DescriptionAttribute("巷道名称:可以自定义")]//只读ReadOnly(true) [
Ca
tegory
Attribute("阻力"),DescriptionAttribute("阻力:总阻力、...
深入理解WPF中的
Property
Grid
控件
WPF
Property
Grid
是一个强大的用户界面控件,它允许开发者以网格形式展示和编辑对象的
属性
。它是设计时和运行时调试不可或缺的工具,大大简化了复杂对象的
属性
管理和展示。在WPF
Property
Grid
中,
属性
编辑器是为...
C#动态
设定
Property
Grid
属性
源码实战项目
为了统一管理动态描述符的创建,推荐采用工厂模式:并通过 DI 容器注入配置规则...在现代桌面应用程序开发中,尤其是基于 Windows Forms 或 WPF 的配置驱动型界面系统里,控件被广泛用于可视化地展示和编辑对象的
属性
。
C#
111,125
社区成员
642,540
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章