asp.net mvc - Using C# Entity Framework how I can display "Select ALL" option in my combobox -
i working on mvc 4.0 entity framework. please consider following action method , me how can display "select all" text in combobox.
[httppost] public actionresult loadcustomer() { userpersistence user = ((userpersistence)session["ultuser"]); ilist customer = dbcontext.customergroups.select ( e => new { id = e.customergroupcode, name = e.customergroupcode + "-" + e.name, cty_iso = e.cty_iso } ).where(e => e.cty_iso == user.cty_iso).tolist(); return new jsonresult { data = new selectlist(customer,"id", "name") }; }
i attached jsonresult combobox working fine problem how can display "select all" text in combobox.
in view i'm using telerik mvc combobox show list:
@(html.telerik().combobox() .name("customercode") .htmlattributes(new { @class = "dropdown", style = "width:90%;" }) .autofill(false) .databinding(binding => binding.ajax() .select("loadcustomer", "ccstypes").cache(true)) .filterable(filtering => { filtering.filtermode(autocompletefiltermode.contains); }) .highlightfirstmatch(true) )
thank you.
Comments
Post a Comment