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.
Unfortunately, activation email could not send to your email. Please try again.

Get values of only those rows which user has modified

Thread ID:

Created:

Updated:

Platform:

Replies:

57454 Mar 5,2007 07:59 AM Mar 7,2007 05:13 AM Windows Forms 5
loading
Tags: GridControl
Manish Bafna
Asked On March 5, 2007 07:59 AM

Hi,
I have databound Grid Grouping Control with one column as GroupId and other as checkbox columns.I want to get values of only those rows which user has modified and save that to database.Also i have one simple parent-child relationships in it--that is it is heirchical grid grouping control.I want only values of rows which user has changed in child table of hierchical grid grouping control.Any help/insights would be highly appreciated.

with warm regards,
Manish Bafna.

Administrator [Syncfusion]
Replied On March 5, 2007 05:03 PM

Hi Manish,

You can set the DataView.RowStateFilter to RowViewStateFilter.ModifiedOriginal to get the modified rows in a underlying datasource of the grid. Here is a minimal sample that shows you "How to access the modified rows in a grid?".

For more details, see the below link.
http://websamples.syncfusion.com/samples/Grid.Windows/F57454/main.htm

Best regards,
Haneef

Manish Bafna
Replied On March 6, 2007 02:59 AM

Hi,
I have tried the code in sample but it is not working.After modifying data in GGC when i check dt.DefaultView.Count,it is always zero
I have one simple parent-child relationship in databound Grid Grouping Control.Now there is databound checkbox column in child table of this hierchical GGC(which is editable).When the user click save button i need to save these changed value in the database.GGC is binded to parent table of dataset.So how will i get reference to child table when i write datatable dt = ggc.Datasource.Afterwards i am going to write dt.defaultview.rowstatefilter = RowStateFilter.ModifiedOriginal.

>Hi Manish,

You can set the DataView.RowStateFilter to RowViewStateFilter.ModifiedOriginal to get the modified rows in a underlying datasource of the grid. Here is a minimal sample that shows you "How to access the modified rows in a grid?".

For more details, see the below link.
http://websamples.syncfusion.com/samples/Grid.Windows/F57454/main.htm

Best regards,
Haneef

Manish Bafna
Replied On March 6, 2007 09:03 AM

Hi,
I have followed the sample given by you.
But when i write ds.Tables["ChildTableName"].GetChanges() it is returning all the rows instead of returning just changed rows.When we debug and see the value of changed row it is showing changed value but rowstate of all the rows is "Added".
because of this when i write dt.DefaultView.RowStateFilter = DataViewRowState.ModifiedOriginal and if check dt.DefaultView.Count then we find that it is returning zero.
I am working on it for last five hours but not able to figure out what the probelm is
It is really urgent for me.Any insights would be highly appreciated.

with warm regards,
Manish Bafna.

>Hi,
I have tried the code in sample but it is not working.After modifying data in GGC when i check dt.DefaultView.Count,it is always zero
I have one simple parent-child relationship in databound Grid Grouping Control.Now there is databound checkbox column in child table of this hierchical GGC(which is editable).When the user click save button i need to save these changed value in the database.GGC is binded to parent table of dataset.So how will i get reference to child table when i write datatable dt = ggc.Datasource.Afterwards i am going to write dt.defaultview.rowstatefilter = RowStateFilter.ModifiedOriginal.

>Hi Manish,

You can set the DataView.RowStateFilter to RowViewStateFilter.ModifiedOriginal to get the modified rows in a underlying datasource of the grid. Here is a minimal sample that shows you "How to access the modified rows in a grid?".

For more details, see the below link.
http://websamples.syncfusion.com/samples/Grid.Windows/F57454/main.htm

Best regards,
Haneef

Administrator [Syncfusion]
Replied On March 6, 2007 03:48 PM

Hi Manish,

Before assigning the underlying datasource of the Grid, you need to call the AcceptChanges method of the DataTable. Andalso call the DataSet.AcceptChanges method to commit the datasource. Please let me know if this helps.

Best regards,
Haneef

Manish Bafna
Replied On March 7, 2007 05:13 AM


Thanks a lot.It is working.

With Warm Regards,
Manish Bafna.

>Hi Manish,

Before assigning the underlying datasource of the Grid, you need to call the AcceptChanges method of the DataTable. Andalso call the DataSet.AcceptChanges method to commit the datasource. Please let me know if this helps.

Best regards,
Haneef

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.

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.

;