728x90
RepositoryItemProgressBar progress = new RepositoryItemProgressBar();
RepositoryItemSpinEdit spin = new RepositoryItemSpinEdit();
void initControl()
{
DataTable dt = new DataTable();
dt.Columns.Add("L");
dt.Rows.Add(1);
dt.Rows.Add(2);
dt.Rows.Add(4);
dt.Rows.Add(10);
dt.Rows.Add(-1);
gridControl1.DataSource = dt;
var colLength = gridView1.Columns.Add();
colLength.ColumnEdit = progress;
colLength.FieldName = "L";
colLength.Visible = true;
gridControl1.RepositoryItems.AddRange(new RepositoryItem[] { spin, progress});
}
private void gridView1_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e)
{
GridView? view = sender as GridView;
if (e.Column.FieldName == "L" && e.RowHandle == view.FocusedRowHandle)
e.RepositoryItem = spin;
}
}
728x90
반응형
'Software > C#' 카테고리의 다른 글
C# DevExpress - WinForm GridControl Button (0) | 2025.01.27 |
---|---|
C# 시작하기 - Mail Send 2 (0) | 2025.01.27 |
C# 시작하기 - Mail Send (0) | 2025.01.27 |
C# DevExpress - WinForm GridControl CheckEdit (0) | 2025.01.27 |
C# DevExpress - WinForm GridControl ImageCombo (0) | 2025.01.27 |