您好,登錄后才能下訂單哦!
GridView總結:
獲取任何一級別中GridView所選中的數據行.
GridView gView = gridControl.FocusedView as GridView;//選中的GridView int[] rows = gView.GetSelectedRows(); //選中的行
有時需要根據條件設置某一個單元格未只讀:
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)//條件 e.Cancel = true; } }
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。