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)