Hello,
We are trying to add in our grid two columns of type combobox with cascading using the HTML Helper for MVC. We are using the parentCombo and parentComboKey options but when we add the key to match the value from the first dropdown, the second dropdown is not showing anything. What are we doing wrong? Here is that part of our code:
cs.ColumnSetting().ColumnKey("Table").ReadOnly(false).Required(true).EditorType(ColumnEditorType.Combo).ComboEditorOptions(co => co.ID("TableCombo").DataSource(ViewBag.Tables).ValueKey("valTable").TextKey("txtTable").Mode(ComboMode.DropDown).EnableClearButton(false));
cs.ColumnSetting().ColumnKey("Field").ReadOnly(false).Required(true).EditorType(ColumnEditorType.Combo).ComboEditorOptions(co => co.ParentCombo("#TableCombo").ParentComboKey("keyTable").DataSource(ViewBag.Columns).ValueKey("valColumn").TextKey("txtColumn").Mode(ComboMode.DropDown).EnableClearButton(false));
Thanks in advance.
Regards,
Hi.
Thank you for using our product. Please try the sample, shown in the following post and tell me if this works for you.
Best regards,
Nikolay Alipiev
Hello Nikolay,
That is the example we are using but it is not working. We tried using the EditOptions as well without luck.
Hi Nikolay,
We were able to make that work changing all the sources to be a JSON result, but now none of the features (paging, filtering, sorting) work on remote type, only local. Is there a way to fix this?
Apparently there was something wrong on the server side as we made a few tweeks and the solution with EditorComboOptions is working. I marked your answer as correct. Thank you for your time.
Hi, guys from Twin Engines.
I'm glad to hear that you were able to resolve your case. Don't hesitate to ask, if you have further questions.