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
3160
How to bind to selected value of comboxitem?
posted

I need to persist "Y" or "N" back to my table. What am I doing wrong?  Thanks!!

 

<igDP:Field Name="ALLOW_IND" Label="Allow">
                                        <igDP:Field.Settings>
                                            <igDP:FieldSettings>
                                                <igDP:FieldSettings.EditorStyle>
                                                    <Style TargetType="{x:Type igEditors:XamComboEditor}">
                                                        <Setter Property="SelectedItem" Value="{Binding DataItem.ALLOW_IND, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></Setter>
                                                        <Setter Property="Value" Value="{Binding DataItem.ALLOW_IND, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></Setter>
                                                        <Setter Property="ItemsProvider">
                                                            <Setter.Value>
                                                                <igEditors:ComboBoxItemsProvider>
                                                                    <igEditors:ComboBoxItemsProvider.Items>
                                                                        <igEditors:ComboBoxDataItem DisplayText="Yes" Value="Y" />
                                                                        <igEditors:ComboBoxDataItem DisplayText="No" Value="N" />
                                                                    </igEditors:ComboBoxItemsProvider.Items>
                                                                </igEditors:ComboBoxItemsProvider>
                                                            </Setter.Value>
                                                        </Setter>
                                                    </Style>
                                                </igDP:FieldSettings.EditorStyle>
                                            </igDP:FieldSettings>
                                        </igDP:Field.Settings>
                                    </igDP:Field>

Parents
  • 3160
    Verified Answer
    posted

    As usual, minutes after I post I guess the answer.  Well, I had to get the clock started.

     

    For anyone who is interested:

    <igDP:Field Name="ALLOW_IND" Label="Allow">
                                            <igDP:Field.Settings>
                                                <igDP:FieldSettings>
                                                    <igDP:FieldSettings.EditorStyle>
                                                        <Style TargetType="{x:Type igEditors:XamComboEditor}">
                                                            <Setter Property="Value" Value="{Binding DataItem.ALLOW_IND, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></Setter>
                                                            <Setter Property="ItemsProvider">
                                                                <Setter.Value>
                                                                    <igEditors:ComboBoxItemsProvider>
                                                                        <igEditors:ComboBoxItemsProvider.Items>
                                                                            <igEditors:ComboBoxDataItem DisplayText="Yes" Value="Y" />
                                                                            <igEditors:ComboBoxDataItem DisplayText="No" Value="N" />
                                                                        </igEditors:ComboBoxItemsProvider.Items>
                                                                    </igEditors:ComboBoxItemsProvider>
                                                                </Setter.Value>
                                                            </Setter>
                                                        </Style>
                                                    </igDP:FieldSettings.EditorStyle>
                                                </igDP:FieldSettings>
                                            </igDP:Field.Settings>
                                        </igDP:Field>

     

     

Reply Children
No Data