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
200
UltraCombo do not updates checkboxes.
posted

Hi i have a UltraCombo and bind data to it using data source.

and this code i use for creating CheckBox in UltraCombo


CheckEditor checkEditor = new CheckEditor();
checkEditor.CheckAlign = ContentAlignment.MiddleCenter;
aUltraCombo.DisplayLayout.Bands[0].Columns.Add("SelChBox");
aUltraCombo.DisplayLayout.Bands[0].ColHeadersVisible = true;
aUltraCombo.DisplayLayout.Bands[0].Columns["SelChBox"].Hidden = false;
aUltraCombo.DisplayLayout.Bands[0].Columns["SelChBox"].Editor = checkEditor;
aUltraCombo.DisplayLayout.Bands[0].Columns["SelChBox"].Header.VisiblePosition = 0;
aUltraCombo.DisplayLayout.Bands[0].Columns["SelChBox"].Header.Caption = "";
aUltraCombo.DisplayLayout.Bands[0].Columns["SelChBox"].Width = 20;

aUltraCombo.CheckedListSettings.ItemCheckArea = ItemCheckArea.Item;
aUltraCombo.CheckedListSettings.ListSeparator = "; ";
aUltraCombo.CheckedListSettings.CheckStateMember = "SelChBox";
aUltraCombo.CheckedListSettings.EditorValueSource = EditorWithComboValueSource.CheckedItems;

 

And when I open ceated ComboBox all checkboxes have undefined state and when i click they are not changed only shows selected data.

 

  • 469350
    Verified Answer
    Offline posted

    Hi,

    The default DataType of an unbound column is String, so that's why it's not working. You just need to add something like this:

    aUltraCombo.DisplayLayout.Bands[0].Columns["SelChBox"].DataType = typeof(Boolean);

    Oh... and you do not need the CheckEditor.