Home Forums WPF controls Xceed DataGrid for WPF Synchronization and performance

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #21568 |

    1. How do you synchronize updates to the grid back to their item source?
    2. I get good performance from the Xceed grid when it is set as the Content of a Window, but when I add the grid to say a stack panel or add a button to the same window as the grid the performance goes down the tubes (25 second delay on load of 350 rows of data). Why?

    Imported from legacy forums. Posted by gregg (had 2842 views)

    Xceed Support
    Member
    Post count: 5658

    1.

    Changes done to the data through the In-Place edition is affected to the data items (from the item source) only once a data row is committed (by pressing enter or by navigating to another data row).

    Cells that did not change are not “forced” on to the data item.

    “Committing” the changes to data storage (such as a Database) is not done by us and need to be done at your convenience.

    2.

    The reason why the performance goes “down the tube” when you add the DataGridControl to a StackPanel is because the StackPanel is not given any size constraints, therefore its children are not constrained neither…

    What this creates is a DataGridControl that takes all the space it needs to “realize” all of the items in the ItemsSource collection. WPF is a framework which is sensitive to the amount of elements present into the visual tree of applications, and realizing all the elements required to display 350 data rows is a lengthy operation and can slow down even high-end systems.

    The DataGridControl uses UI Virtualization to prevent this scenario, but for the UI Virtualization to kick in, the DataGridControl needs to be constrained in size… To achieve that, you’ll need to specify a maximum size either on the panel or on the DataGridControl itself.

    As for the case of the button, I’d like to have further details and if possible, your XAML code, so we can understand what is happening.

    If any part of this answer is not answering your concerns, feel free to repost on this thread with some additional details, and I’ll be glad to provide a more complete answer.

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

    User (Old forums)
    Member
    Post count: 23064

    Marcus
    Got it, and thanks so much. I’m new to both wpf and the grid and appreciate the explanation.

    Imported from legacy forums. Posted by gregg (had 4049 views)

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