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
570
Adding a not selected value to data set in combo box
posted

Hi there

 

I have search the web flat and it seems like my googling skills let me down.  I was not able to add a "not selected" item to a bounded comboBox.  Is there a way to do it with the XamComboEditor?

 

This is what I wanted to do...  But with no success.

 

<igEditors:XamComboEditor ItemsSource="{Binding Source={StaticResource odpStockNo}}"
                                                  ValuePath="IDStockNo"
                                                  Value="{Binding Path=FKStockNo}"
                                                  DisplayMemberPath="StockNo" Name="igCombo">
                            <igEditors:ComboBoxItemsProvider>
                                <igEditors:ComboBoxItemsProvider.Items>
                                    <igEditors:ComboBoxDataItem DisplayText=" not selected " Value="-1"/>
                                </igEditors:ComboBoxItemsProvider.Items>
                            </igEditors:ComboBoxItemsProvider>
                        </igEditors:XamComboEditor>

 

but it seems like it is not possible to add an item to a already bounded object.  Is there a work around?  It cant be that difficult?!  It is standard in asp and WinForms!

 

Regards

Christo