datagridview自定义列如何排序

LLVSN 2011-09-07 05:44:21
如题,类似对DataGridViewCheckBoxColumn进行排序
...全文
109 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
rollng 2011-09-08
  • 打赏
  • 举报
回复


DataGridViewCheckBoxColumn1.HeaderCell.SortGlyphDirection = SortOrder.Descending;
this.orderBy = "DESC";


or

DataGridViewCheckBoxColumn1.HeaderCell.SortGlyphDirection = SortOrder.Ascending;
this.orderBy = "ASC";
Bullatus 2011-09-08
  • 打赏
  • 举报
回复
应该有一个排序接口吧,实现这个接口应该就可以按自己的方式进行排序了
LLVSN 2011-09-08
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 rollng 的回复:]
DataGridViewCheckBoxColumn1.HeaderCell.SortGlyphDirection = SortOrder.Descending;
this.orderBy = "DESC";


or

DataGridViewCheckBoxColumn1.HeaderCell.SortGlyphDirection = SortOrder.Ascending;
t……
[/Quote]
多谢rollng提示,其实自定义列在载入时设定SortMode属性即可。
感谢各位的参与,送分
加旋仔 2011-09-07
  • 打赏
  • 举报
回复
有一个DataGridViewColumnSortMode 的属性,自动。升序,降序

16,555

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧