当前位置: 代码迷 >> C# >> DevExpress 的Gridcontrol 行号有关问题不显示
  详细解决方案

DevExpress 的Gridcontrol 行号有关问题不显示

热度:489   发布时间:2016-04-28 08:37:10.0
DevExpress 的Gridcontrol 行号问题不显示
public Mes()
        {
            InitializeComponent();
            Mes_Load();
        }
        private void Mes_Load()
        {
            string str = "select * from co_truck_reg";
            DataSet ds = DbHelperOra.Query(str);
            gridControl1.DataSource = ds.Tables["ds"];
            gridView1.BestFitColumns();   
        }
        private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
        {
            if (e.Info.IsRowIndicator && e.RowHandle >= 0)
            {
                e.Info.DisplayText = (e.RowHandle + 1).ToString().Trim();
            }
        }
我做的是打开这模块 gridview就加载数据  我明明写了添加行号 可是不显示 
------解决思路----------------------
我做时,行号是我自己绑定上去的
------解决思路----------------------
就是没绑定事件呗
  相关解决方案