This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm using the 2/9/2014 WPF Elements 6 nightly build. My app needs to target .net 3.5. I'm building a large app that is getting this LostFocus problem where the setter of my ObservableCollection item gets called every time I hit a key, and not on LostFocus. This thread mentions you have fixed this issue, but I seem to be getting it: DataGrid-EditorTemplate UpdateSourceTrigger=LostFocus So to eliminate problems cause by my own app, I downloaded your "TestDataGrid" sample app and ever so slightly modified it to use DisplayMemberBindings with LostFocus. The setter on the "Name" property gets called with every keystroke when I edit the Name field in the grid. I'll attached the modified TestDataGrid app. Could be a .net 3.5 problem? I am forced to use this platform. |
|
|
Hello Angie Thanks for using our WPF Elements DataGrid. As you may have gathered, by default, the DataGrid will automatically find all the properties on your data model and create a column for each property. Then, when you add DataGridColumn instances to the Columns collection of the DataGrid, the DataGrid will match your custom column definitions to the columns that it created itself and apply the additional properties that you set - in this case DisplayMemberBinding. Unfortunately DisplayMemeberBinding alone is not enough for the DataGrid to work out which column/property you want to apply it to. This is because the DisplayMemberBinding could be all sorts of complicated paths. What you will need to do is set the PropertyName property on each of your DataGridColumns to tell the DataGrid exactly which column/property you want the DisplayMemberBinding to be used on. For example:
Let me know if you have any other questions about using our DataGrid. -Jason Fauchelle |
|