Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello.

 

I have a sortable datagrid bound to a datatable. I'm allowing the user to add/change cells as well as add/change/delete rows.

 

Once the user is finished they will select a button "Accept changes". I want to only look at the rows that were changed.

 

Is there a method built into the datagrid that allows me to do this?

 

Any suggestions would help.

 

Thanks.

Posted

To specifically see just those changed rows, look into using the DataRowState enum - it lets you filter off your data-table for a given row-state (modified, added, deleted, etc).

 

Here's a quick sample to get your changed rows:

DataTable tempTable = origTable.GetChanges(DataRowState.Changed);

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...