Customize rows to expand in data grid

0
In data grid, we have the option to set limit of number of rows we want to show at a time. Can we customize it for a data grid such that it initially shows 20 rows and gives option to expand to show more rows or something on the same lines? I know we have something like this in list view but i can only use a data grid so do we have a feasibility there?
asked
2 answers
0

No, this is defined design-time.

You can fake it by adding several datagrids, showing only the wanted one. But that is not good practice.

answered
0

Hi Pragya, you can implement the paging yourself. Simply place the datagrid in a dataview which holds a context entity. In that entity store the start index and end index of the currently shown list, or simply the visible count of items. Beneath the datagrid you can place a button to epxand the list. This button should raise the count, or end index of the list to show. Afterwards refresh the list and it should display more items then before.

Only thing to do now is to set the page size of the datagrid to a value bigger then your maximum list size and to set the paging to buttons and hide them via css.

 

If you require any more indepth instructions I can provide them if required.

answered