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 =>
{
//An unbound column
columns.Add(o => { }).Title("Author").Width(100);
//An unbound column
columns.Add(o => { }).Title("Avatar").Width(80);
//A column bound to the "text" field defined by the anonymous type
columns.Add(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"))
%>