Hi,
I have a dropdown column (named "Languages") in iggrid where I enable multiSelection : "onWithCheckboxes". My problem is that every time I enable more than one option and press button "Done", in the column "Languages" only the first selection is displayed (instead of seeing the list of my selections separated by comma).
In the formatter: function(val) { ... } option for the column, val contains only the first selected value, so I'm guessing there is the problem.
Please can you help me?
Kind regards,
Please can you provide me with a code example of iggrid (jquery) which has a column set as multiSelection onWithCheckboxes? Any help is highly appreciated..
I have fixed it in a very dirty way, please let me know if there is any better one. What I did: when the dropdown is closing, I store it's value in a hidden field. When I press button "Done" I overwrite the value of the cell with the hidden field value. Any ideas are welcome!
$("#igGrid1").igGrid({
dataSourceUrl: "<%= Url.Action("GetDocumentsList") %>",
virtualization: false,
autoGenerateColumns: false,
columns: [...
{ headerText: "Language", key: "Language", dataType: "string", formatter: formatLanguageCombo }
],
features: [{
name: 'Updating',
columnSettings: [{
columnKey : "Language",
editorType : "combo",
editorOptions : {
mode : "dropdown",
dataSource : LanguageJSON,
multiSelection : "onWithCheckboxes",
textKey : "Name",
valueKey : "ID",
readOnly : true,
dropDownClosed: function(evt, ui) { //combobox event
$("#hdnLanguage").val(ui.owner._userTxt);//store the value of the dropdown in a hidden field on the form
}
}],
editRowEnded: function(evt, ui) {
var row = ui.rowID;
$("#igGrid1").igGrid("rows")[row].cells[4].innerText = $("#hdnLanguage").val();
},
Hello IccAppSupport,
Thank you for sharing the solution. It works fine.
On the other hand, you may also use allowCustomValue option. The allowCustomValue option allows and keeps the values in the field.
For more details please refer to the attached sample.
If you have any questions, please let me know as well.
Hi Vivian,
Thanks a lot, that was the missing piece of the puzzle!
I am using Version 13.2.20132 and facing the same issue pardeepkgupta has described. The following attributes are set on the Combo:
- multiSelection: 'onWithCheckboxes'
- allowCustomValue: true
- itemSeparator: ','
- selectItemBySpaceKey: true
- autoComplete: true
Detailed issuedescription:
if I don't set allowCustomValue, the selection via keyboardinput and space works like a charm, but as soon as I Close the Dropdown, only the first value is set in the field.
If I enable allowCustomValue, I can select multiple values like before, when I Close the Dropdown, the selected values are correctly in the field (separated via itemSeparator). If I reopen the Dropdown via mouseclick on the arrow, the items are selected as well.
But if I want to enter more values via field (directly click in the field and add a itemseparator to select another item), the Fieldvalues are deleted except the first one, and in the Dropdown nothing is selected.
is there any solution available for this specific behaviour?
Thank you in advance for your Investigation and help
I am using version 12.1.2049 and facing the issue you described above. In Edit Mode, the multi selection combo values are not selected. which service release should I install and where could i find it?
Thanks in advance!
Hi IccAppSupport,
Current version of igCombo with enabled allowCustomValue, may fail to show selection in drop-down list, when "text" of combo is set from codes (which is used by grid-combo editors).That should not affect value in grid-editor, but only showing latest selection in list will fail when edit mode started for a cell which has multiple items. Instead supposed to be selected values would be rendered with matching styles: bold font.
That issue has been fixed and update will be available within service releases.
Thanks for report.