We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Modifying the datasource of the grid

Thread ID:

Created:

Updated:

Platform:

Replies:

45307 Jun 16,2006 11:27 AM UTC Jun 19,2006 09:25 AM UTC WinForms 3
loading
Tags: GridControl
Prathima Venkobachar
Asked On June 16, 2006 11:27 AM UTC

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.

Administrator [Syncfusion]
Replied On 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

Prathima Venkobachar
Replied On 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

Prathima Venkobachar
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;