Mose
Mose

Reputation: 563

jqgrid Row Size

How do you force a row to be a given height? I have a grid that has a column that sometimes has lengthy data and the rows auto-size to fit it in. I'd like to force the rows to remain a uniform height, however all of my searches seem yield results from people trying to achieve the exact opposite.

Upvotes: 0

Views: 1894

Answers (1)

Oleg
Oleg

Reputation: 221997

What you need to do is just set the CSS attribute 'height' of the row (of the <tr>) element. It is important that you can do this only after the row will be created. So you have to place the changing of the 'height' inside of loadComplete of gridComplete event handle.

The answer contain working demos. The usage of setRowData inside of the loop is not the best way from the performance side, but nevertheless the demos shows the main idea how to set the fixed row height dynamically.

Upvotes: 1

Related Questions