Hi,I have a class with some properties that have to be bound to a XamDatagrid. That class also contains a property that returns a list of items. Let's call It 'ListOfItemProperty'. That property can't be static because I want to filter the list on other property values defined in the same instance. How can I bind a XamComboEditor's ItemsSource to the 'ListOfItemProperty' instance of the underlying object of the XamDataGrid?Greetings
Hello,
In this case I think it is best to use an Unbound Field like this:
<igDP:UnboundField BindingPath="ListProperty">
<igDP:UnboundField.Settings>
<igDP:FieldSettings EditorType="{x:Type igEditors:XamComboEditor}">
<igDP:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igEditors:XamComboEditor}">
<Setter Property="ItemsSource" Value="{Binding DataItem.ListProperty}"/>
</Style>
</igDP:FieldSettings.EditorStyle>
</igDP:FieldSettings>
</igDP:UnboundField.Settings>
</igDP:UnboundField>
Hope this helps,
Alex.
Alex,It works on existing rows, but when i want to add a new row in the grid the underlaying dataitem doesn't exist yet? Whenever i fill another column first then the dataitem is constructed and it works fine.
I wonder if it might be better to bind directly to the datacontext which contains an list of those dataitems, but i don't know how to do that either. (the debug output says "can't find property")
Greetings
Thanks Alex,
This was the solution. You really helped me out