Hi,
We are using Grouping Grid in our application. After assigning the datasource for the grid, I need to use the same data table and make some modifications. But these changes should not be reflected in the grid. Is there any way to achieve this?
Syncfusion Version : 3.3.0.0
.Net Version : 1.1
Regards,
Prathima.
AD
Administrator
Syncfusion Team
June 16, 2006 01:17 PM UTC
Hi Prathima,
If you want to change the underlying datasource of the tablecontrol, then you need to call the BeginUpdate and Endupdate method. Here is a code snippet.
this.gridGroupingControl1.TableControl.BeginUpdate();
DataTable dt = this.gridGroupingControl1.DataSource as DataTable;
for(int i = 0 ;i < dt.Rows.Count;i++)
dt.Rows[i][1] = "New Parent";
this.gridGroupingControl1.TableControl.EndUpdate(true);
Here is a sample.
http://www.syncfusion.com/Support/user/uploads/Nested_GGC_7c9427b1.zip
Please refer to the forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?MessageID=42533
Let me know if this helps.
Best Regards,
Haneef
PV
Prathima Venkobachar
June 16, 2006 03:57 PM UTC
Hi Haneef,
Thanks a lot for the update. My requirement is something like this.
DataTable dtSource = GetDataFromDatabase();
this.grid1.DataSource = dt;
Now I would like to modify dtSource by deleting 3 records from the DataTable but I want the grid to display those 3 records even though the underlying DataTable does not contain those records. Is it possible to prevent the grid from updating itself from the changed DataTable?
Regards,
Prathima
PV
Prathima Venkobachar
June 19, 2006 09:25 AM UTC
Hi Haneef,
Thanks a lot for the update. My requirement is something like this.
DataTable dtSource = GetDataFromDatabase();
this.grid1.DataSource = dtSource;
Now I would like to modify dtSource by deleting 3 records from the DataTable but I want the grid to display those 3 records even though the underlying DataTable does not contain those records. Is it possible to prevent the grid from updating itself from the changed DataTable?
Regards,
Prathima