javascript - kendo UI multi select bind one list value to change another multi select list -
ok trying grab value kendo ui multi select list , change array in secound list based on whats being returned mvc controller post back
this post back, returns json object
[httppost] public actionresult findprofilesettings(string selectedid) { var profiles_msl = obtainprofilesmethod(selectedid); viewbag.profiles_msl = new list<profiles>(profiles_msl); var result = new list<profiles>(profiles_msl); return json(result); } this post via ajax,
scv = scv.substring(0, scv.length - 6); $.ajax( { type: "post", url: '@url.action("findprofilesettings", "account")', contenttype: "application/json; charset=utf-8", a: scv, data: json.stringify({ selected: scv }), cache: false, error: function (data) { alert("error"); }, success: function (data) { (x in data) { var markup; markup = "<option value=" + data[x]["id"] + ">" + data[x]["profiles"] + "</option>"; $("#id").html(markup).show(); } } }) the data being sent in full list , works having issues biding kendo multi select
this first multi select list
@(html.kendo().multiselect() .placeholder("select ") .maxselecteditems(1) .name("list") .value(new[] { new { } }) .htmlattributes(new { id = "msl", data_bind = " options: list, optionstext: 'id', optionsvalue: 'cid'" }) .events(e => { e.change("onchange"); }) ) and 1 need change
@(html.kendo().multiselect() .placeholder("select profiles") .name("profiles") .value(new[] { new { } }) .htmlattributes(new { id = "id", data_bind = "options: profiles_msl, optionstext: 'profiles', optionsvalue: 'id'" }) ) i think issues in how im building multi select
the kendo ui multiselect hasn't got 'cascading from' element current isn't possible.
Comments
Post a Comment