Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Setting Max Height
posted

I’ve placed a XamDataGrid with both Height & Width set to Auto and the MaxHeight and MaxWidth set to Infinity inside a UserControl Object, That is itself placed as a Child of a WrapPanel in a ScrollDoc object. I then format and add multiple rows of Data programmatically to the XamDataGrid.

I discovered that after a relatively small number of rows the XamDataGrid automatically creates a ScrollBar, and doesn’t display all the records.  My Clients want one scroll bar for all records with none hidden;

So I then set the Max Height to a large value (in this case 100,000) and while this forced the data grid to display fully, it then however lead to an issue of Out of Memory Exceptions being thrown with all my windows in the program being deleted and redrawn in no particular order;

In this instance there were 56 XamDataGrids and 8557 rows between all of them.

Is there a way to Display all the rows within the XamDataGrids like my Client wants, without causing Out of Memory Exceptions?