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
205
Setting the max rows to display in XamDataGrid
posted

Hello,

I'm working on a XamDataGrid where I need to allow for rows to be added and displayed up to a max number of rows (then the scrollbar should appear and the grid stops expanding). For example: I have a grid with 3 rows displayed as the default. I want to allow the user to add rows and the grid expand to show the rows up to a max of 5 rows and then the grid stops expanding and the scroll bar kicks in. Initially, I set the xamdatagrid.height to auto, but I don't know how to turn this off after I reached the max number of rows. I tried setting the height to the "xamDataGrid.ActualHeight" after the max number of rows had been reached and it seemed to work. However, my custom grid navigation methods no longer worked in the grid (such as adding new rows by tabbing or hitting the down arrow). How do I turn the "auto" height off and keep the current height for the grid? Or is there a better way to do what I want to do here?

Thanks,

David