Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
755
Bind the Itemssource of a XamComboEditor to the instance of the binded object of the row
posted

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

Parents
  • 69686
    Suggested Answer
    posted

    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.

     

Reply Children