Data Grid - Cascading Editors

This module illustrates cascade comboboxes: City and Region. These comboboxes are displayed when you edit a grid row. The City combobox is dynamically populated with city names based on the value selected in the Region combobox.

Both the Region and City columns use the EditTemplate context cast to the CellEditContext type that contains:

  • An original cell value as a DataItem object
  • An EditedValues dictionary with changed cell values.
  • A CellValue object that stores the current cell’s value.
  • Two overloads of the OnChanged method that allow one combobox to respond to another combobox’s value change.
  • The GetEditorValue method that returns a value of any grid cell.

Click Edit to see how the Region and City comboboxes communicate using the OnChanged and GetEditorValue methods to pass/get values to/from each other.

Europe, Middle East, Africa London Support Engineer
Asia/Pacific Tokyo System Administrator
North America New York Software Developer