Friday, February 6, 2009

Example to use js array to bind a GridView

Using Ajax Data Controls we can do this.

here is the sample

"<" AjaxData:Gridview ID="ImagesList" runat="server" Visible=True ">"

"<"/AjaxData:GridViewBoundColumn>
""<"/AjaxData:GridViewBoundColumn">"

"<"/AjaxData:Gridview">"


function pageLoad(sender, e)
{
var data = new Array();
data[0] = { Id: 1, Name: "Scott" };
data[1] = { Id: 2, Name: "Tiger" };
data[2] = { Id: 3, Name: "Zeke" };
data[3] = { Id: 3, Name: "Joe" };
adc.set_dataSource(data);
adc.dataBind();
}

No comments:

Post a Comment