I'm using combo with the grid but it doesn't seem to do anything when i select a value from the dropdownlist. I have the formatter function like so..
column.For(x => x.Client).HeaderText("Client").Width("150px").FormatterFunction("lookupClient);
and the column setting like this...
settings.ColumnSetting().ColumnKey("Client").ReadOnly(false).Required(true).EditorType(ColumnEditorType.Combo).ComboEditorOptions(co => co.DataSource(ViewBag.ClientList).ValueKey("ID").TextKey("Value").Mode(ComboMode.DropDown).EnableClearButton(false));
Hello Nikki,
I am glad that you managed to achieve your requirement.
Please let me know if you need any further assistance with this matter.
My bad. Thank you very much!
Hello nikki,
I tested your code and noticed that you didn't pass the correct valueKey to the combo editor. Your combo datasource has the following structure: {Key: ..., Value: ...}, so the valueKey should be "Key" and the textKey should be "Value". In this case the combo will work properly and you'll be able to select items from it.
Attached is a sample for your reference.
If you have any further questions, please let me know.
Regards,
Tsanna
Hi Tsanna,
Attached is my code. You will have to copy and paste to a blank mvc project controller, model, and view as I am not able to upload a zip version of the entire sample project. I think it hits a size limit.
Please let me know if you need anything else.
Thanks,
Nikki
Please send me your sample, so that I can run and test it on my side. Thanks!
Regards,Tsanna