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 7981971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:32:16+00:00 2026-06-04T10:32:16+00:00

I have a datagrid with a list of JobItem objects, and when I select

  • 0

I have a datagrid with a list of “JobItem” objects, and when I select an item from this list, I want to be able to open it up in a new window and be able to edit its properties and save it. I have the databinding part of it, I just don’t understand how I can pass the object instance that I selected from datagrid, and have its information populated in the new window. I found the exact project in codeproject that did what I wanted to do and looked at the code but I still could not figure out who this object instance was passed. The article is:

http://www.codeproject.com/Articles/332615/WPF-Master-Details-MVVM-Application

  • 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-06-04T10:32:17+00:00Added an answer on June 4, 2026 at 10:32 am

    Cast the ListViewItem to the object.

    `(ObjectType)YourListView.SelectedItem` 
    

    will give you an instance of the class, if that’s what you’re asking.

    You can then pass it to the edit form through it’s constructor. If you pass it by value, you’ll have to write some update code in the original form to “merge” the changes.

    I think if you pass it by reference, it’ll update the listview on it’s on if you have it set up correctly with INotifyPropertyChanged. You may want to test that to make sure, though. I’m not 100% on that.

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

Sidebar

Related Questions

I have a DataGrid of objects, and I want to modally edit them; pop
I have a datagrid that displays a list of custom objects. This list contains
I have datagrid with list of MyPlayer objects linked to ItemsSource, there are ComboBoxes
I have a datagrid in a WPF populated from a csv file. This is
Background I'm trying to bind my objects to a DataGrid I have a list
I have a datagrid from wpf Toolkit, with the itemsource binded to a Observable<Item>
I have a dataGrid bound to a List object and this works fine by
I have a WPF Datagrid binded with list of interface objects. Consider, ClsEmployee class
I have a WPF datagrid, bound to a list populated by linq-to-sql from a
I have a custom dataGrid that acts more like a 2D list (if that

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.