This example shows how to bind Telerik Grid for ASP.NET MVC to external web service which returns JSON (Twitter in this case).
The example shows how to use the OnDataBinding and OnRowDataBound client-side events as well as the dataBind JavaScript method.
<%= Html.Telerik().Grid<TwitterItem>()
.Name("Grid")
.Columns(columns =>
{
columns.Template(o => { }).Title("Author").Width(100);
columns.Template(o => { }).Title("Avatar").Width(80);
//A column bound to the "text" field defined by the anonymous type
columns.Bound(o => o.text).Title("Post"); //
})
%>
<%= Html.Telerik().Grid(new { text = "" })
.ClientEvents(events => events.OnDataBinding("onDataBinding"))
%>
<%= Html.Telerik().Grid(new { text = "" })
.ClientEvents(events => events.OnRowDataBound("onRowDataBound"))
%>