我想将一个下拉列表绑定到一个telerik网格,以便当下拉列表的值发生变化时,网格将通过ajax进行更新以显示结果。这是我到目前为止的代码:如何通过Ajax将Telerik MVC网格绑定到DropDownList?
IndexView:
<%Html.RenderPartial( “AptProfileFilter”); %> <%= Html.Telerik()。网格(Model.profiles)//初始服务器绑定 请将.Name( “配置文件”)。数据绑定(数据绑定=>数据绑定
阿贾克斯()
.Update(” _AjaxBinding“,”AptProfile“,new {id =(string)ViewData [”BuildingID“]})) 。 columns.Bound(p => p.Apartment.Building.Complex.Name).Width(100); columns.Bound(p => p.Apartment.Building.BuildingID).Width(100); columns.Bound (p => p.Apartment.AptRate).Width(100); }) .Pageable() .Sortable()
我用萤火虫来确定正确的数据被公布(选择从我的下拉列表一个元素之后) 回数据收集在GridModel类,但我不明白为什么它不用这个新数据更新网格?
我对web开发很陌生。谢谢你的帮助!