I want to change the height of the DataGrid based on the number of records, for example, if there are 2 records, the height of both records will be displayed, but the maximum height limit is 10 records. Is there a way to implement this function?
Hi,
Define allRowsVisible="true"
to enable dynamic height for the DataGrid, i.e. DataGrid witll expand and retract based on the row count. To limit the height if the DataGrid, you can define the maxHeight
attribute. Notice that maxHeight
doesn’t accept rows number, it should be in a format understood by the browser, e. g. 100px
or 2.5em
.
Regards,
Gleb
Okay, thank you