Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: Multiple UpdateBindingSource calls with DataGrid

$
0
0
Hi MichelK7,

After looking in the DataGrid code, it appears to be a normal behavior to refresh the binding before pushing the value to the user object when a cell is done editing. The reason why the calls to DataGrid.Cell.UpdateContentBindingTarget and DataGrid.Cell.UpdateContentBindingSource are multiplied with many columns is that a column might depends on the value of another column.

So if the Quantity of Strawberry is edited to a value below 5, we validate the "Quantity" column for this row. But we also needs to validate the "Name" colum" to check for errors that might happens on the "Name" column if the "Quantity" column doesn't respect a specific validation. At the end, each cell of a row will be validated when 1 cell in that row is done edited.

As you pointed out, the UpdateTarget and UpdateSource method will call your indexer. I suggest you don't fetch slow data too often in that call or cache the value for future indexer calls.

Thanks.

Viewing all articles
Browse latest Browse all 2157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>