Posted 12 January 2020, 1:35 am EST
I would like to place a combobox in a flexgrid that’s bound to an entity. I would like to do it in the viewmodel using the MVVM pattern, but I can’t find a dependency property that I can bind to. At present the only way I can do this is in the code behind.
My XAML
<c1:C1FlexGrid.Columns>
<c1:Column Binding="{Binding shortname}" Header ="מחלקה" Width="100"/>
<c1:Column Binding="{Binding fullname}" Width="150"/>
<c1:Column Binding="{Binding Eshortname}" Width="100" Header="English"/>
<c1:Column Binding="{Binding Instituteid}" Width="50" Header="מכון" />
</c1:C1FlexGrid.Columns>
my code behind:
this.deptfg.Columns["Instituteid"].ValueConverter = new ColumnValueConverter(institutes, "id", "shortname");
Is there another to do this using the MVVM pattern? Should I use another control?
Haim Katz