Is it possible to constrain the height of an Infragistics grid

asp.netinfragistics

I've tried Infragistics on this but they don't seem to understand what I am asking and it takes days to get an answer so please help!

I need to place an Infragistics web grid into either a div or a table cell. The grid must size to fit the div or cell. If there is too much data to display, I need the grid to do its magic and add its own scrollbars.

So far I have achieved this using javascript and resizeing every time the browser window resizes. Unfortunately when refreshing the page (using AJAX), the grids resize themselves to their default sizes for a second before correcting but this is not acceptable to the customer (or me for that matter).

It is irritating that width=100% works but height=100% does not. I find that it just extends out of the div or table (not even resizing the div, just expanding out of it).

I have tried the KB article that sets the height and width to 100% and the frame custom rules to table-layout:auto but this doesn't work.

UPDATE

I created a test project with a 500px tall table, two rows (each 50% height) and two cells per row to give a 2 x 2 grid. If I set the Infragistics grid height to 100% within a cell, it fits perfectly until you bind it to data. It then extends, making the table more than 500px high.

I tried putting a 100% x 100% div in one of the cells and the grid in this. Then the table stays the correct size but the grid grows in height by the size of a row and extends out of the div and the cell 🙁

I am starting to wonder if the Infragistics web controls are as good as they should be. They certainly don't seem to be as good as the Windows versions.

Best Solution

Have you tried only specifying width=100% and leaving the height specification off of the grid completely?

Another thought is placing the grid on an asp.net panel and placing the panel in the div or table cell.

Related Question