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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:32:41+00:00 2026-06-03T04:32:41+00:00

I have a DataGrid (currently the .NET 3.5 WPFToolkit version, but I can use

  • 0

I have a DataGrid (currently the .NET 3.5 WPFToolkit version, but I can use the .NET 4.0 out-of-the-box DataGrid if needed) bound to a collection of objects. Three of the columns in the data grid represent pieces of information used as a key to grab other information from the database. This other information is used in calculations to populate other columns of the data grid.

Once the user enters these three fields, and the combination of the data in those fields exists in the database, the row is considered valid for adding to collection. The user is also now allowed to freely edit the other columns in the row. Once any other column is given data by the user, the three “key” fields are considered “locked” – the user may no longer edit them. The only way to change that information is to delete the entire row and add a new row.

1) What is the best way from a UX perspective to handle this? Should I allow the user to enter data in any column, “cache” their entries, then do my calculations all at once only after the “key” data is entered? Or should I restrict the user to only enter the “key” data first, then allow the user to enter data in the other columns?

2) What is the strategy (event handlers I need, etc.) for implementing the above in the data grid? How do I not allow the new row to be added to the data bound collection until it has valid “key” data, or do I allow the new row to be added with validation errors and somehow track that it is ok for the user to continue editing the “key” columns of the partially complete row, but not other existing rows in the data grid?

  • 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-03T04:32:43+00:00Added an answer on June 3, 2026 at 4:32 am

    This is what I did for my particular situation:

    1) The best way to handle this is to give the user the most flexibility possible. This means allowing the user to edit the key data under certain conditions, but not restricting the user to entering key data first.

    2) The strategy for implementing that has two parts. First, define when the use is not allowed to edit the key data anymore, and add styles to the datagrid columns that switch the key value columns to a read-only mode based on a trigger. Second, when key data is changed, perform all of the logic behind-the-scene as if the row were deleted using the old key data and then created using the new key data. This will cover all of the side-effects I need to have happen.

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

Sidebar

Related Questions

I have a wpf datagrid which is bound to an observable collection. Currently I
I'm trying to use WPFToolkit's DataGrid control (and C#/.Net 3.5) to display a ComboBox
I currently have a custom CheckBox style which I use in a DataGrid. However,
I currently have a datagrid bound to a table with tens of thousands of
I have a datagrid getting bound to a dataset, and I want to display
I have a DataGrid, populated with objects in an ArrayCollection. After updating one of
I have a DataGrid of objects, and I want to modally edit them; pop
I have a DataGrid a user can add items to by entering data in
I have a DataGrid in my WPF window which is bound to a database.
I currently have a WPF DataGrid binded to a DataSet via the DataGrid's ItemsSource

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.