private void UpdateView() { // Bind the data C1GridView1.DataSource = GetDataSet(); C1GridView1.DataBind(); if (C1GridView1.EditIndex != -1) { drawEditingSymbol(C1GridView1.EditIndex); } }
protected void C1GridView1_RowUpdating(object sender, C1GridViewUpdateEventArgs e) { // bind the grid C1GridView1.DataSource = GetDataSet(); // update the datasource C1GridView1.Update(); // Reset the edit mode for the current item C1GridView1.EditIndex = -1; // Refresh the grid UpdateView(); }
private void LoadData() { using (OleDbConnection connection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\C1NWind.mdb;Persist Security Info=True")) { string cmdStr = string.Format("select top {0} [OrderID], [ShipName], [ShipCity], [ShippedDate] from ORDERS order by OrderID", PageSize); if (CurrentIndex != 0) { cmdStr = string.Format("select top {0} [OrderID], [ShipName], [ShipCity], [ShippedDate] from ORDERS where OrderID not in (select top {1} OrderID from ORDERS order by OrderID) order by OrderID", PageSize, CurrentIndex * PageSize); } using (OleDbDataAdapter adapter = new OleDbDataAdapter(cmdStr, connection)) { DataTable orders = new DataTable(); adapter.Fill(orders); orders.PrimaryKey = new DataColumn[] { orders.Columns["OrderID"] }; C1GridView1.DataSource = orders; C1GridView1.DataBind(); UpdatePanel1.Update(); } } }
private void UpdateView() { // Bind the data C1GridView1.DataSource = GetDataSet(); C1GridView1.DataBind(); }
private void UpdateView() { C1GridView1.RowDeleting += new C1.Web.Wijmo.Controls.C1GridView.C1GridViewDeleteEventHandler(C1GridView1_RowDeleting); C1GridView1.DataSource = GetDataSet(); C1GridView1.DataBind(); }
private void LoadData() { C1GridView1.DataSource = CreateDS(); C1GridView1.DataBind(); }