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
4341
ComboEditor with checkbox with a grid
posted

Hello Support,

We are working on comboeditor with checkboxes, we are displaying the comboeditor with a xamdatagrid. We are able to bind the comboeditor but we do not know how to dispaly the checkboxes with the combo editor. 

In the design mode we have written following code :

 <igEditors:ComboBoxItemsProvider x:Key="ComboItemsProvider">

                                            <igEditors:ComboBoxItemsProvider.Items>

                                                <CheckBox Content="Abcd"/>

                                                <CheckBox Content="Efgh"/>

                                                <CheckBox Content="Ijklm"/>

                                            </igEditors:ComboBoxItemsProvider.Items>

                                        </igEditors:ComboBoxItemsProvider>

For binding the source to the comboeditor we have written following code :
            ds = objProductionNode.GetProductionNodeInfo()
            Dim comboProvider As ComboBoxItemsProvider = TryCast(Me.xamGridSubDepartment.TryFindResource("ComboItemsProvider"), ComboBoxItemsProvider)
            comboProvider.ItemsSource = ds.Tables(0).DefaultView
            comboProvider.DisplayMemberPath = ds.Tables(0).Columns("ProductionNodeName").ToString()
            comboProvider.ValuePath = ds.Tables(0).Columns("ProductionNodeID").ToString()
We tried attaching the items at the design time with the check box, but when we try to bind the dataosource to the combo, it gives an exception saying "items must be empty before assinging item source". We tried removing the items which we binded at the design time. After removing these items from the design time the items do appear in the combo editor but without the checkbox.
Can you please tell us where we are going wrong. Please let us know if there is any way to add the check box to the comboeditor (in the xamdatagrid) and bind the combeditor with the datasource. 
Please find attached the screen shot for your reference.

Parents Reply Children