Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1150
igCombo inside igGrid displays ValueKey instead of TextKey when edit mode ended
posted

Hi,

I have another question on having igCombo as editor inside an igGrid. I set up my editor something like this:

features.Updating()
  .EnableAddRow(true)
  .EnableDeleteRow(true)
  .EditMode(GridEditMode.Row)

  .ColumnSettings(s =>

{

      s.ColumnSetting().ColumnKey("Product").EditorType(ColumnEditorType.Combo)
          .ComboEditorOptions(options => { options.DataSource(Model.Products).TextKey("ProductName").ValueKey("ProductID"); });

}

When I select a product from the combo, the ProductName is displayed, but when I clicked the 'Done' button, the ProductID is displayed instead of the ProductName.

Is this the intended behavior ? if so, is there any way around it ? I want to display the text value after the edit mode ended.

Also, why is the combo data source not getting the whole object that I passed in from the MVC controller ? let's say my Product entity has ID, Name, Price, and Description. Only the Name and ID are available inside the data source since it's set as Text and Key value.

Thanks,

Jeffrey

Parents Reply Children
No Data