Hello,we recently ran into a problem with igCombo, and we are not sure how to deal with it.We want to use a multiselectable combobox dropdown with ticks defined like this:
@(Html.Infragistics() .ComboFor(model => model.Committees) .ID("SubTopicCommitteeCombo") .Width("150") .LoadOnDemandSettings(lods => lods.Enabled(true).PageSize(25)) .DataSourceUrl(Url.Action("GetComboCommittees")) .ValueKey("CommitteeID") .TextKey("FullTitle") .CompactData(true) .EnableClearButton(false) .MultiSelectionSettings(msw => msw.Enabled(true)) .MultiSelectionSettings(msw => msw.ShowCheckBoxes(true)) .DataBind() .Render() )
It all works fine, until we reload the page, submit or fetch any ticked data.Now the problem is basically:So far, everytime we reload the page and fetch data, no matter what we previously selected, the combobox dropdown has no items ticked.Therefore: How does the model property assigned to the combobox dropdown have to look like in C#, so the data is submitted and fetched correctly?
Thanks in advance.
Hello Stanislas,
You mentioned that you set the ID to "Hans Muller" but in your case it should be set to the database ID which should be an integer value like 3 for example. It should match the ResponsibleID value. Please review the example which I provided in my last post.
If this doesn't work, please send me a sample demonstrating your issue so I can further investigate.
Hello,
I thought so too, but:I looked at the data returned by the controller on the server through .DataSourceUrl(Url.Action("GetAgendaItems")) and saw, that the ID is correctly setto "Hans Müller". Which is also apparent, when looking at the igGrid before editing. It shows "Hans Müller".Only during editing, does the entry change to whichever item is first in the combobox.
Therefore:I'm not sure what I'm doing wrong.
Hello again,
In order to have the correct contact selected, the value of ResponsibleID and the value of the "Müller, Hans" ContactID should be the same. Let's assume you have only one row with one column ResponsibleID, the data would look like this:
I look forward to hearing from you.
first of all, thank you for your quick reply and helpful advice!Now, this is almost what we want.There is just one last problem left:The dropdown combobox shows only the first entry in the dropdown entry field, instead of showing the previously selected item.I.e.: During editing the combobox entry field holds whatever is the first entry in the dropdown, instead of the perviously set Müller, Hans, as seen before editing.We need the selected item that is set in the igGrid before editing though.How can we accomplish that?
To achieve the desired behavior, you can change the combo mode to dropdown like this:
If you have any other issues, please let me know.