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
35
Selected item not checked in UltraCombo
posted

I'm creating an UltraCombo and populating it with a DataTable. The table has two columns, the first is a boolean named "Selected" and the second is a string named "Name". Here's the code:

                        DataTable dropdowntable = ColumnValuesProvider.getTable((string)columnMeta["CUSTOM_CONFIG"]);
                        udd.DataSource = dropdowntable;
                        udd.ValueMember = dropdowntable.Columns[1].ColumnName;
                        udd.CheckedListSettings.CheckStateMember = dropdowntable.Columns[0].ColumnName;
                        udd.CheckedListSettings.EditorValueSource = Infragistics.Win.EditorWithComboValueSource.CheckedItems;
                        udd.CheckedListSettings.ItemCheckArea = ItemCheckArea.Item;
                        gridCol.EditorComponent = udd;

 

(The gridCol variable here is a column in an UltraGrid.)

For testing, the values in the table are { false, "abc", false, "def", true, "ghi" }.

I have two questions. First and most importantly, when I select the drop-down, the checkbox for the third row is unselected. How do I initialize the checkbox so it is checked/unchecked based on the value for the column's value?

Second, and perhaps related, I want the value of the "gridCol" to initially show a comma-separated list based on the rows whose Selected column is true. How can I do this?

Thanks....

 

Parents Reply Children
No Data