SQL
Today all the Web Developer know about jQuery the Javascript framework. And
jQuery Server Control is also popular. You can download this from codeplex.:http://jqueryuiserverctls.codeplex.com/
You can also read about jQuery Grid name jqGrid and it's free open source
(http://www.trirand.com/blog/?page_id=6) and it's UI version is paid: http://www.trirand.net/demo.aspx
But if you are really love AJAX / Javascript then use the open source javascript
framework.
http://www.ext.net/
http://examples.ext.net/
http://extaspnet.codeplex.com/
I give demo for Gridview control of Ext.NET
How to install the Ext.NET
Jut put the Ext.Net.dll in Bin folder.
Add the new Tab in ToolBox and call this
.dll
Change your webconfig like
<configSections>
</configSections>
<httpHandlers>Code
<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />Code
</httpHandlers>Code
<httpModules>Code
<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />Code
</httpModules>Code
<system.webServer>Code
<modules runAllManagedModulesForAllRequests="true"/>Code
<validation validateIntegratedModeConfiguration="false"/>Code
<modules>Code
<add name="DirectRequestModule"Code
preCondition="managedHandler" type="Ext.Net.DirectRequestModule, Ext.Net"/>Code
</modules>Code
<handlers>Code
<add name="DirectRequestHandler"Code
verb="*" path="*/ext.axd" preCondition="integratedMode"Code
type="Ext.Net.ResourceHandler" />Code
</handlers>Code
</system.webServer>Your aspx page
Code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Gridview1.aspx.cs" Inherits="GridView_Gridview1" %>Code
Code
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>HTML / XML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">Code
<html xmlns="http://www.w3.org/1999/xhtml">Code
<head runat="server">Code
<title></title>Code
</head>Code
<body>Code
<form id="form1" runat="server">Code
<ext:ResourceManager ID="ResourceManager1" runat="server">Code
</ext:ResourceManager>Code
<div>HTML / XML
<ext:GridPanel ID="GridPanel1" runat="server" Height="500" Width="500" Title="Employee Information">Code
<ColumnModel ID="ColumnModel1" runat="server">Code
<Columns>Code
<ext:Column ColumnID="ID" DataIndex="ID" Header="ID">Code
</ext:Column>Code
<ext:Column Header="Name" DataIndex="Name" width="150">Code
</ext:Column>Code
<ext:Column Header="City" DataIndex="City" width="150">Code
</ext:Column>Code
</Columns>Code
</ColumnModel>Code
<Store>Code
<ext:Store ID="Store1" runat="server" OnRefreshData="MyData_Refresh">Code
<Reader>Code
<ext:JsonReader>Code
<Fields>Code
<ext:RecordField Name="ID">Code
</ext:RecordField>Code
<ext:RecordField Name="Name" >Code
</ext:RecordField>Code
<ext:RecordField Name="City">Code
</ext:RecordField>Code
</Fields>Code
</ext:JsonReader>Code
</Reader>Code
</ext:Store>Code
</Store>Code
<SelectionModel>Code
<ext:RowSelectionModel runat="server">Code
</ext:RowSelectionModel>Code
</SelectionModel>Code
<LoadMask ShowMask="true" />Code
<BottomBar>Code
<ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="25">Code
<Items>Code
<ext:Label ID="Label1" runat="server" Text="Page size:" />Code
<ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />Code
<ext:ComboBox ID="ComboBox1" runat="server" Width="80">Code
<Items>Code
<ext:ListItem Text="25" />Code
<ext:ListItem Text="50" />Code
</Items>Code
<SelectedItem Value="25" />Code
<Listeners>Code
<Select Handler="#{PagingToolbar1}.pageSize = parseInt(this.getValue()); #{PagingToolbar1}.doLoad();" />Code
</Listeners>Code
</ext:ComboBox>Code
</Items>Code
</ext:PagingToolbar>Code
</BottomBar>Code
</ext:GridPanel>Code
</div>Code
</form>Code
</body>Code
</html>Your .cs page
Code
using System;Code
using System.Collections.Generic;Code
using System.Linq;Code
using System.Web;Code
using System.Web.UI;Code
using System.Web.UI.WebControls;Code
using Ext.Net;Code
Code
public partial class GridView_Gridview1 : System.Web.UI.PageCode
{Code
string connection = System.Configuration.ConfigurationManager.ConnectionStrings["testDatabaseConnectionString"].ToString();Code
protected void Page_Load(object sender, EventArgs e)Code
{Code
if (!X.IsAjaxRequest)Code
{Code
this.BindData();Code
}Code
}Code
protected void MyData_Refresh(object sender, StoreRefreshDataEventArgs e)Code
{Code
this.BindData();Code
}
private void BindData()Code
{Code
Store1 = this.GridPanel1.GetStore();C#
using (ExtNetDataDataContext db = new ExtNetDataDataContext(connection))
{
var info = (from a in db.Emp_Msts select new
{ID = a.id,Name = a.emp_name + " " + a.emp_lname,
City = a.city});Code
Store1.DataSource = info;
Store1.DataBind();
}
}
}

Join the conversation! Your thoughts help the community grow.