<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<script runat="server">

	protected void RadGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
	{
		DataTable dt = new DataTable();
		DataRow dr;
		int colsNum = 3;
		int rowsNum = 50;
		string colName = "Column";

		for (int j = 1; j <= colsNum; j++)
		{
			dt.Columns.Add(String.Format("{0}{1}", colName, j));
		}

		for (int i = 1; i <= rowsNum; i++)
		{
			dr = dt.NewRow();

			for (int k = 1; k <= colsNum; k++)
			{
				dr[String.Format("{0}{1}", colName, k)] = String.Format("{0}{1} Row{2}", colName, k, i);
			}
			dt.Rows.Add(dr);
		}

		(sender as RadGrid).DataSource = dt;
	}
	
</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>RadControls for ASP.NET AJAX</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="50" BackColor="Yellow" />

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
	<AjaxSettings>
		<telerik:AjaxSetting AjaxControlID="RadGrid1">
			<UpdatedControls>
				<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
			</UpdatedControls>
		</telerik:AjaxSetting>
	</AjaxSettings>
</telerik:RadAjaxManager>

<p>RadGrid with custom pager images:</p>

<telerik:RadGrid
	ID="RadGrid1"
	runat="server"
	Skin="Vista"
	AllowPaging="true"
	OnNeedDataSource="RadGrid_NeedDataSource">
	<PagerStyle Mode="NextPrevAndNumeric"
		PrevPageImageUrl="~/MoveUp.gif" NextPageImageUrl="~/MoveDown.gif" />
</telerik:RadGrid>

</form>
</body>
</html>