GridControl 显示行号功能
using DevExpress.Utils;using DevExpress.XtraEditors;
using DevExpress.XtraGrid;
using DevExpress.XtraGrid.Columns;
using DevExpress.XtraGrid.Views.Base;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
在窗体加载的load事件下面加上这句 this.gridView1.IndicatorWidth = 40;
private void gridView1_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
{
e.Appearance.TextOptions.HAlignment = HorzAlignment.Far;
if (e.Info.IsRowIndicator)
{
if (e.RowHandle >= 0)
{
e.Info.DisplayText = (e.RowHandle + 1).ToString();
}
}
}
请问WPF下的GRID怎么显示行号? ssjun 发表于 2013-8-31 21:13
请问WPF下的GRID怎么显示行号?
WPF我都还没有去用过,所以这个问题我不能回答你,但你可以试着百度下。百度是最好的老师 nbjjy 发表于 2013-8-31 21:22
WPF我都还没有去用过,所以这个问题我不能回答你,但你可以试着百度下。百度是最好的老师 ...
找过,没找到,{:3_60:}
页:
[1]