관리 메뉴

안까먹을라고 쓰는 블로그

[DevExpress] GridView Column CheckBox로 변환 본문

Language/C#

[DevExpress] GridView Column CheckBox로 변환

YawnsDuzin 2018. 10. 2. 15:06

 

반응형
sQuery = String.Format("EXEC [dbo].[spBaseMAC_Master] 2, '', '', '', '', '', '', ''");
DT = GV.DB.GetDataTableSelectQuery(GV.sQuery);
gridControl1.DataSource = DT;
// 사용 법
GVColumnCheckEditChange(gridView1.Columns["삭제여부"]);
GVColumnCheckEditChange(gridView1.Columns["A-L사용"]);
GVColumnCheckEditChange(gridView1.Columns["B-L사용"]);
GVColumnCheckEditChange(gridView1.Columns["C-L사용"]);
// 변환 함수
private void GVColumnCheckEditChange(DevExpress.XtraGrid.Columns.GridColumn _Columns)
{
DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit selectnew = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
_Columns.ColumnEdit = selectnew;
selectnew.NullText = "";
selectnew.ValueChecked = "Y";
selectnew.ValueUnchecked = "N";
selectnew.ValueGrayed = "-";
}


반응형
Comments