Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1026941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:09:41+00:00 2026-05-16T12:09:41+00:00

I have binded a list with Editable WPF DataGrid I want to get only

  • 0

I have binded a list with Editable WPF DataGrid

I want to get only the modified Items from the WPF Data Grid for updation.

Please let me know how to do this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:09:42+00:00Added an answer on May 16, 2026 at 12:09 pm

    I have my WPF datagrid app set up as so:

    1) Manually defined all the columns, set their bindings and for each binding specified that it notifies on source updates

    2) Added an event handler for the datagrid’s SourceUpdated event

    3) In the event handler I have only the following code:

    this.updatedItems.Add(BindingOperations.GetBindingExpression(e.TargetObject, e.Property).DataItem as MyClass); 
    

    updatedItems is a HashSet<> and MyClass is the type of objects bound to the datagrid’s ItemsSouce.

    4) When the user clicks on the save button I simply enumerate the hashset. Hashset is nice, because it only contains unique values. So if a row is edited multiple times or even if multiple cells in the same row are edited, the hashset will still only contain a single entry for the object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data table with binded to a large list. I want to
I have a datagrid from wpf Toolkit, with the itemsource binded to a Observable<Item>
I have a WPF Datagrid binded with list of interface objects. Consider, ClsEmployee class
So I have binded a List to a ListView where the List has items
I have binded a list of enum to a combobox. Now I want to
I have an EditorGridPanel with a CheckboxSelectionModel. In the Ext.data.Source binded to this grid,
I have a weird problem with datagrid. I have a list with 2 items,
I have a grid that is binded to a dataset that is populated from
I have a nice WPF DataGrid binded to a collection of objects. Everything works
i have three listboxes, whose itemsSource is binded to a list, list and dictionary.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.