[原创]Datagrid的排序
排序其实很简单,当你开启排序后,所有的页眉字段会成为连接形式,当点击时会触发Datagrid1_sortCommand事件,在事件的处理程序中我们指定DataView的Sort属性为e.Sortexpression(代表选定行),即可实现以该行来排序。
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/InBlock.gif)
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)
排序其实很简单,当你开启排序后,所有的页眉字段会成为连接形式,当点击时会触发Datagrid1_sortCommand事件,在事件的处理程序中我们指定DataView的Sort属性为e.Sortexpression(代表选定行),即可实现以该行来排序。