jason tang

jason tang

  • NA
  • 14
  • 17.4k

How to reload data with Telerik().TreeView() in mvc3

Jun 20 2014 3:27 AM
i want to add a search button above the TreeView control,but i don't know how to reload the datasource,and how to do in the controller?
this is my view code:
@(Html.Telerik().TreeView()
.Name(Model.ValueControlId + "projectroom-treeview")
.BindTo(Model.AvailableProjectRooms, mappings =>
{
mappings.For<ProjectRoom>(binding => binding
.ItemDataBound((item, projectRoom) =>
{
item.Value = projectRoom.RoomGUID.ToString();
item.Text = projectRoom.RoomName;
item.ImageUrl = null;
item.Expanded = true;
item.Selected = projectRoom.RoomGUID == Model.SelectedRoomGUID;
}));
})
.ClientEvents(events => events
.OnSelect("onSelectMessage")
)
)