I use a UltraComboEditor control with checkboxes as a EditorComponent of a UltraGrid Column.
The UltraGrid Column is bound to a SQL Server varchar(1000) column.
I want to display inside this column a series of Bank Branches, the user can check the Branches he wants and two things should happen:
1. The UltraGrid Cell should display the selected Branches (using DisplayMember values separated by the defined ListSeparator: ";"). This happens fine, I see for example: BRANCH 200;BRANCH 201;BRANCH 202;BRANCH 203
2. The relevant data cell should contain the selected Branch's IDs (using ValueMember values) separated by the defined ListSeparator: ";" for example: 200;201;202;203. This doesn't happen. Instead I get the same value BRANCH 200;BRANCH 201;BRANCH 202;BRANCH 203 as above.
A sample of the code I use is:
uceActiveForBranchList.DataSource = dsReports.Tables(0) uceActiveForBranchList.DisplayMember = "BranchDescr" uceActiveForBranchList.ValueMember = "BranchId" uceActiveForBranchList.CheckedListSettings.CheckBoxStyle = CheckStyle.CheckBox uceActiveForBranchList.CheckedListSettings.EditorValueSource = EditorWithComboValueSource.CheckedItems uceActiveForBranchList.CheckedListSettings.ListSeparator = ";" uceActiveForBranchList.CheckedListSettings.ItemCheckArea = ItemCheckArea.CheckBox e.Layout.Bands(0).Columns("ActiveForBranchList").EditorComponent = uceActiveForBranchList
I use version 10.1.20101.2053 of Infragistics2.Win.UltraWinEditors.v10.1
and Infragistics2.Win.UltraWinGrid.v10.1 components.
What can I do to make this work as I want?
Hello,
Thank you for your response,
Actually the control display "BRANCH 200, BRANCH 201, BRANCH 202" something which is desired by me.
The Value of the cell although is the same "BRANCH 200, BRANCH 201, BRANCH 202". This is not desired. The value of the cell should contain "200, 201, 202"...
Thanks in advance.
Hello Probank,
I have been looking into this forum thread, and it seems to me that you would like to display in the dropdown "BRANCH 200", "BRANCH 201", etc., while when the customer clicks on the checkbox and adds the item the the checked items, the control should display then 200;201;.. etc. If this is right you could use the UltraCombo control instead of the UltraComboEditor. I have created the required code snippet that achieve similar look and feel. You could change it in your sample and verify if this is the desired one:
ultraCombo1.DataSource = dt ultraCombo1.DisplayLayout.Bands(0).Columns("ID").Hidden = True ultraCombo1.DisplayLayout.Bands(0).ColHeadersVisible = False Dim c As UltraGridColumn = Me.ultraCombo1.DisplayLayout.Bands(0).Columns.Add() c.Key = "bool"; c.DataType = GetType(Boolean) c.Header.VisiblePosition = 0 ultraCombo1.ValueMember = "ID" ultraCombo1.CheckedListSettings.EditorValueSource = Infragistics.Win.EditorWithComboValueSource.CheckedItems ultraCombo1.CheckedListSettings.CheckStateMember = "bool" ultraCombo1.CheckedListSettings.ListSeparator = ";" ultraCombo1.CheckedListSettings.ItemCheckArea = Infragistics.Win.ItemCheckArea.CheckBox