DevExpress-GridView

GridView总结:

获取任何一级别中GridView所选中的数据行.

GridView gView = gridControl.FocusedView as GridView;//�x中的GridView
int[] rows = gView.GetSelectedRows(); //�x中的行

有�r需要根���l件�O置某一���卧�格未只�x:

private void gridView9_ShowingEditor(object sender, CancelEventArgs e)
{
            DevExpress.XtraGrid.Views.Grid.GridView gv = gridControl1.FocusedView as DevExpress.XtraGrid.Views.Grid.GridView;
            if (gv.FocusedColumn== gridColumn1)
            {
                MyList myList = gv.DataSource as MyList;
                if (myList == null)
                    return;
                My my = myList[gv.FocusedRowHandle] as My;
                if (my == null)
                    return;
                if(true)//�l件
                    e.Cancel = true;
             } 
}


你可能感兴趣的:(GridView,DevExpress,数据行)