0

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.

following following

Cœur
  • 37,241
  • 25
  • 195
  • 267
user1448783
  • 263
  • 3
  • 5
  • 9

1 Answers1

1

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

DmitryG
  • 17,677
  • 1
  • 30
  • 53