I am using XtraGrid Control using C#. I want to set inplace editors in XtraGrid separately in each row ie. separate editors for separate rows
See the following two images representing grid controls. I want such type of grid.
I am using XtraGrid Control using C#. I want to set inplace editors in XtraGrid separately in each row ie. separate editors for separate rows
See the following two images representing grid controls. I want such type of grid.
To implement first image, please use the GridView.CustomRowCellEdit event:
void gridView1_CustomRowCellEdit(object sender, CustomRowCellEditEventArgs e) {
if(e.Column.FieldName!="Value") return;
GridView gv = sender as GridView;
string editorName = (string)gv.GetRowCellValue(e.RowHandle, "EditorName");
switch (editorName) {
case "Spin Edit":
e.RepositoryItem = repositoryItemSpinEdit1;
break;
case "Combo Box":
e.RepositoryItem = repositoryItemComboBox1;
break;
case "Check Edit":
e.RepositoryItem = repositoryItemCheckEdit1;
break;
//...
}
}
To implement second image use the DevExpress PropertyGrid Control