-
public DataSet BindGrid()
-
-
{
-
-
OleDbConnection con = new OleDbConnection( "provider=Microsoft.Jet.Oledb.4.0; Data Source=" + Server. MapPath( "~/App_Data/C1NWind.mdb" ));
-
-
OleDbDataAdapter da;
-
-
DataSet ds = new DataSet();
-
-
da = new OleDbDataAdapter( "Select * from Customers" , con);
-
-
da. Fill(ds);
-
-
return ds;
-
-
}
-
-
protected void Page_Load( object sender, EventArgs e)
-
-
{
-
-
if (!IsPostBack)
-
-
{
-
-
C1GridView1.DataSource = BindGrid();
-
-
C1GridView1.DataBind();
-
-
}
-
-
}
-
protected void C1GridView1_Sorting( object sender, C1.Web. Wijmo.Controls.C1GridView.C1GridViewSortEventArgs e)
-
-
{
-
-
}
-
-
//Processing Sorting
-
-
protected void C1GridView1_Sorted( object sender, EventArgs e)
-
-
{
-
-
C1GridView1.DataSource = BindGrid();
-
-
C1GridView1.DataBind();
-
-
}
-
protected void C1GridView1_Filtering( object sender, C1.Web. Wijmo.Controls.C1GridView.C1GridViewFilterEventArgs e)
-
-
{
-
-
}
-
-
//Processing Filtering
-
-
protected void C1GridView1_Filtered( object sender, EventArgs e)
-
-
{
-
-
C1GridView1.DataSource = BindGrid();
-
-
C1GridView1.DataBind();
-
-
}
-
protected void C1GridView1_PageIndexChanging( object sender, C1.Web. Wijmo.Controls.C1GridView.C1GridViewPageEventArgs e)
-
-
{
-
-
C1GridView1.PageIndex = e. NewPageIndex;
-
-
C1GridView1.DataSource = BindGrid();
-
-
C1GridView1.DataBind();
-
-
}
-
//Processing Column Grouping
-
-
protected void C1GridView1_ColumnGrouped( object sender, C1.Web. Wijmo.Controls.C1GridView.C1GridViewColumnGroupedEventArgs e)
-
-
{
-
-
C1GridView1.DataSource = BindGrid(e.Drag.HeaderText);
-
-
C1GridView1.DataBind();
-
-
}
-
-
//Processing Column UnGrouping
-
-
protected void C1GridView1_ColumnUngrouped( object sender, C1.Web. Wijmo.Controls.C1GridView.C1GridViewColumnUngroupedEventArgs e)
-
-
{
-
-
}