Hello,
I have some questions about how the GridViewComboBoxColumn binds to a lookup list in a Hierarchical scenario.
I have a WPF window that has a RadGridView on it that is displaying the following schema correctly with no comboboxes in any columns, just the integer that binds to the property (SecurityLevel) (relevant columns only)
Application1 SecurityLevel
--------------------------------------------------
Client1 SecurityLevel
Module1 SecurityLevel
Application2 SecurityLevel
--------------------------------------------------
Client1 SecurityLevel
Client2 SecurityLevel
Module1 SecurityLevel
So the main grid's ItemSource is sourced from the "ApplicationAccess" property of the main view model That object is a List<> of UserApplicationAccessViewModel objects. That view model has two nested properties, "ClientAccess" and "ModuleAccess". Each are List<> members containing their respective ViewModel types, UserClientAccessViewModel and UserToolModuleAccessViewModel.
Each view model, including the primary application view model, UserApplicationAccessViewModel contains this "SecurityLevel" property which is an integer. The list that contains those SecurityLevel objects is an adjacent member of each viewModel class. So my intent is to bind that list to the GridViewComboBoxColumn of each row at each level. So the user selects a value from the combobox lookup which sets the SecurityLevel property.
{relevant members of each view model}
public List<SecurityLevel> SecurityLevels { get; set; }
public int SecurityLevel { get; set; }
I have found some posts here that have demos for this funtionality at the single level but have not found any that demonstrate it at a Hierarchical level.
This is the markup for the GridViewComboBoxColumn at the top level.
<telerik:GridViewComboBoxColumn x:Name=
"Application_SecurityLevelSelection_ComboBox"
DataMemberBinding=
"{Binding SecurityLevels}"
Width=
"100"
Header=
"SecurityLevel"
DisplayMemberPath=
"FriendlyName"
SelectedValueMemberPath=
"SecurityLevel"
/>
I am tapped into the DataLoading event of the grid to format some behaviour of the child grids. Is this event the key to building and binding this list?
I can databind the column above by name to the list in the main view model and it displays the list correctly but is not binding to each row. No SecurityLevel is selected in the dropdown list when the record shows, and when you select one and move to another row (another application) the selection dissapears. Which seems normal because it has to be bound to each row.
If anyone can offer some suggestions here I would appreciate it.
Thanks,
Reid