Hello all,
I used Kendo UI MultiSelect and Grid controls in my MVC project. There is one column called "Actions" with string value ( like "Read" or "Read, Create" or ...) on the Grid. When user click "Edit" command, Kendo MultiSelect control ( It located inside sub folder "EditorTemplates") will appear one that column to let user re-select the actions. The code worked file except failed to populate current values of the "Actions", I tred couples of way but no lucky so far. Can I get someone's Help?
Thanks in advance!
Below are pieces of code:
One of Grid columns:
columns.Bound(p => p.Actions).Width(200).Title("Actions").EditorTemplateName("Actions");
Multiple selection Control in "Actions.cshtml" view which inside "EditorTemplates" folder
@(
Html.Kendo().MultiSelectFor(m => m)
.Name("Actions")
.DataTextField("Text")
.DataValueField("Value")
.AutoClose(false)
.ClearButton(false)
.BindTo(new List<SelectListItem>() {
new SelectListItem() {Text = "Create", Value = "1" },
new SelectListItem() {Text = "Read", Value = "2" },
new SelectListItem() {Text = "Update", Value = "3" },
new SelectListItem() {Text = "Delete", Value = "4" } })
)