Home Forums WPF controls Xceed DataGrid for WPF Recompute cell values inline

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #26267 |

    Hi, I have what seems like a simple problem, but I am unable to get the DataGrid to behave like I want. Our users want the ability to enter data into a cell, tab out of it, and have the value of other cells computed based on the value they just entered. For example, there are price, quantity, and total fields on a single record. There is a default value in the price field, and when the user enters a value in the quantity field, and tabs out of it, the total field should recompute and display its new value.

    So far, I’ve created a property descriptor for the CurrentColumn property of the WPF DatagridControl, and I have an event that fires OnValueChanged. I save a reference to the column each time, so I know which column it is leaving when it fires. If the column is the quantity column, I attempt to recompute the total. This is where the problem lies.

    It seems I can’t access the value the user entered because it has not been committed to the data source yet. If I call EndEdit from the data row, which commits the change, it messes up the tabbing, and forces the user to double click on the row again. This seems like it should be simple, but I cannot seem to figure it out. Thanks in advance for any help.

    Imported from legacy forums. Posted by Jonathan (had 1892 views)

    Xceed Support
    Post count: 5658

    MiddleTommy did find a solution for this a little while back…

    You can find his solution in this post:


    You can also see this one, which discuss a slightly different approach:


    Imported from legacy forums. Posted by Marcus [Xceed] (had 2883 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.