DevExpress&UI

GridControl 행추가

Code GGOON 2020. 10. 6. 17:51
반응형
DataTable dt = this.GridDataSource as DataTable;

// 첫 행 추가
DataRow dr = dt.NewRow();            
dt.Rows.InsertAt(dr, 0);
dt.Rows[0][this.SelectionCheckBoxFieldName] = "Y";
dt.Rows[0]["ROW_STATE"] = "C";
this.GridDataSource = dt;

this.GridDataSource.AcceptChanges();

 

반응형