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
|
Hello We have just started adding asynchronous data fetching in our WPF application where we are using your data grid. Before we had asynchronous fetching of data, the AutoColumnWidthBehavior="OneTime" worked as I expectedt, that after a collection of items is bound to the datagrid it will calculate the column widths ONE time and not dynamically as you scroll. But after we added the async methods, the data grid never calculates the column widths. I created a repro project to show this problem, but for some reason, in the repro project, neither synchronous nor asynchronous methods make the data grid work as I expect. I hope that you might be able to help us with this since the AutoColumnWidthBehavior="OneTime" behaviour was very appreciated by our customers. I have emailed you the repro project where neither of the different ways of fetching data make the data grid behave as I expect. Best regards |
|
|
Hi Nicklas, Thanks for the repro project. Currently the OneTime auto size behaviour is triggered when the ItemsSource property changes, not when items are added or removed from the collection like in your repro. This is a behaviour we will not be able to change as it will most likely break the expected behaviour for some people. So I hope you are able to change the logic in your app to first fill a collection with the data, and then set that to the property bound to the DataGrid ItemsSource. This will work regardless of how you load the data. Your repro project also pointed out a few issues present when the DataGrid has columns, but no rows. These issues have been resolved for the next nightly build. Let me know if you have further questions. -Jason Fauchelle |
|