Search code examples
silverlightsilverlight-4.0silverlight-toolkit

Silverlight datagrid load all rows


The Silverlight datagrid seems to load rows (firing off the LoadingRow event) while I scroll up and down.

Is there a way to prevent this behavior? I would like to load all rows at once when I set the datagrid's ItemSource.

Is this possible?


Solution

  • Most likely happening because SL datagrid uses virtualization for performance optimization. You can read more here, but it appears the solution is to add this to your DG declaration:

    VirtualizingStackPanel.VirtualizationMode="Standard"