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 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
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.
I am still following this forum thread.Please feel free to let us know if you have any other questions with this matter.
Hi,
I have the same requirement as mentioned below:
1) UltraComboEditor with multi select option (Implementation Done).
2) Selected item shiould be displayed in the comma seperated manner with display member (Implementation Done)
3) Retreiving data on the selected item but value member should be considered rather than display member.(Not done)
4) after the saving the same when we retreive it ,same thing should be displayed in the UltracomboEditor as we were having at the time of saving.
Please reply to this atthe earliest because we need it on urgent basis.
Many Thanks,
Rajeev Ranjan
Hello Andres,
This seems like an odd behavior to me. Please take a look at my sample.
Did a solution was ever found for this?
Desired behavior is:
Assuming DataSource is a table with columns Id, Description (ex 1, "Option1", 2, "Option2", 3, "Option3")
Any luck?
Thanks!