Hi,
Having trouble in getting list in GridComboBoxColumn in UWP. Let me also admit, that i am myself new to UWP, ViewModels and Telerik. I will try to explain and please ask questions if any.
I have a page.xaml in which i have declared DataContext.
<Page.DataContext>
<viewmodels:GridViewModel/>
</Page.DataContext>
GridViewModel class has following properties
APFieldList MyGridFieldList; it as column1, column2 .... columnN
ObservableCollection<RDictionary> UserRDictionary;
RDictionary is a simple class.
public class RDictionary
{
public string Key { get; set; }
public string Value { get; set; }
}
I want column2 to be of type GridComboBoxColumn and combobox list should be populated from UserRDictionary. UserRDictionary contents will come at runtime after some user actions like button_click.
On page.xaml I have defined things as per documentation.
<Page.Resources>
<viewmodels:GridViewModel x:Key="myresxitems"/>
</Page.Resources>
and in Grid
<Custom:DataGridComboBoxColumn PropertyName="column2" ItemsSource="{Binding UserRDictionary, Source={StaticResource myresxitems }}" />
On Button_Click i am populating UserRDictionary as below.
this.gvm1 = (this.DataContext as GridViewModel);
this.gvm1.LoadRDictionaryAsync(this.gvm1.UserSelectedFile);
But the combobox is not populating list. Maybe i am doing some silly mistake. I believe the instance of datacontext and myresxitems are different. Can someone please guide.
Regards