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
595
Binding an UltraCombo with multiple checkboxs into an UltraGridCell
posted

Hi,

I'm trying to bind an UltraCombo to an UltraGrid cell.

My UltraCombo is configured to have multiple selection with checkboxs.

When the UltraCombo is not binded to the grid i can use the multiple selection normally and it works fine, but after i bind it to the grid i can only choose one value (checkbox) and then the UltraCombo closes.

Is there a way to make it stay open and allow me to choose multiple items?

Adding my code (happens on the grid's InitializeLayout event):

UltraCombo ucbx2 = new UltraCombo();
ucbx2.BindingContext = this.BindingContext;
ucbx2.DataSource = mdsLocations.LOCATION;
ucbx2.DisplayMember = "DESCRIPTION";
ucbx2.ValueMember = "LOCATION_KEY";

UltraGridColumn ugc = ucbx2.DisplayLayout.Bands[0].Columns.Add();
ugc.Key = "Selected";
ugc.Header.Caption = string.Empty;
ugc.Header.CheckBoxVisibility = HeaderCheckBoxVisibility.Always;
ugc.DataType = typeof(bool);
ugc.Header.VisiblePosition = 0;


ucbx2.CheckedListSettings.EditorValueSource = EditorWithComboValueSource.CheckedItems;
ucbx2.CheckedListSettings.ListSeparator = " / ";
ucbx2.CheckedListSettings.ItemCheckArea = ItemCheckArea.Item;
ucbx2.DisplayMember = "DESCRIPTION";
ucbx2.ValueMember = "LOCATION_KEY";
ucbx2.CheckedListSettings.CheckStateMember = "Selected";

e.Layout.Bands[0].Columns[LOCATION_KEYColumn.ColumnName].ValueList = ucbx2;
e.Layout.Bands[0].Columns[LOCATION_KEYColumn.ColumnName].Header.Caption = "Location";
e.Layout.Bands[0].Columns[LOCATION_KEYColumn.ColumnName].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;

Thanks,

Ziv.