Binding selected value of Dropdownlist to Grid
-
Hi, I am using Kendo Dropdown list and Kendo Grid, when I select an item, in the dropdown, the Kendo grid should display the records for value of the selected item of the Kendo dropdown, when I change it, the records in the Grid also change. I am trying in the below way, not able to achieve, any help would be very helpful - thanks in advance.
@{
ViewBag.Title = "ListLookups";
//Layout = "~/Views/Shared/_LayoutFinal.cshtml";
}.k-edit-form-container { width: 500px; }
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()Lookup @(Html.Kendo().DropDownList().Name("Lookup").OptionLabel("Select") .DataTextField("Text") .DataValueField("Value").HtmlAttributes(new { style = "width:280px;", @id = "drpLookup" }) .DataSource(dataSource => dataSource.Read(read => read.Action("GetListOfLookupTables", "Admin"))) .Events(e => { e.Change("GetLookupTableValue"); }) )
List of Contacts
@(Html.Kendo().Grid() .Name("LookupGrid") .EnableCustomBinding(true) .AutoBind(false) .Columns(columns => { columns.Bound(p => p.Id).Hidden(); columns.Bound(p => p.Type); columns.Bound(p => p.Description); columns.Command(command => { command.Custom("View").Click("ViewLookupTableValues").HtmlAttributes(new { @class = "k-primary" }); }).Width(100); }) .Pageable() .Sortable() .Scrollable() .Resizable(resize => resize.Columns(true)) .Filterable(x => x.Extra(false).Operators(O => O.ForString(str
-
Hi, I am using Kendo Dropdown list and Kendo Grid, when I select an item, in the dropdown, the Kendo grid should display the records for value of the selected item of the Kendo dropdown, when I change it, the records in the Grid also change. I am trying in the below way, not able to achieve, any help would be very helpful - thanks in advance.
@{
ViewBag.Title = "ListLookups";
//Layout = "~/Views/Shared/_LayoutFinal.cshtml";
}.k-edit-form-container { width: 500px; }
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()Lookup @(Html.Kendo().DropDownList().Name("Lookup").OptionLabel("Select") .DataTextField("Text") .DataValueField("Value").HtmlAttributes(new { style = "width:280px;", @id = "drpLookup" }) .DataSource(dataSource => dataSource.Read(read => read.Action("GetListOfLookupTables", "Admin"))) .Events(e => { e.Change("GetLookupTableValue"); }) )
List of Contacts
@(Html.Kendo().Grid() .Name("LookupGrid") .EnableCustomBinding(true) .AutoBind(false) .Columns(columns => { columns.Bound(p => p.Id).Hidden(); columns.Bound(p => p.Type); columns.Bound(p => p.Description); columns.Command(command => { command.Custom("View").Click("ViewLookupTableValues").HtmlAttributes(new { @class = "k-primary" }); }).Width(100); }) .Pageable() .Sortable() .Scrollable() .Resizable(resize => resize.Columns(true)) .Filterable(x => x.Extra(false).Operators(O => O.ForString(str
Hi, Your issue isn't actually direclty related to ASP.NET in general. There may be some here who knows about Telerik controls, but I believed you stand a better chance by posting it at Telerik dedicated forums: Forum threads about Grid Kendo UI for jQuery[^] Or atleast at JavaScript forums section: JavaScript Discussion Boards[^]