Question

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.

Was it helpful?

Solution 4

I resolved this in the end by removing the doctype from the ASP.NET page. It seems that the way that the grid is laid out does not work properly with IE in standards mode. It looks like mainly an IE problem.

Infragistics have said that they are working on a new grid that doesn't have these problems but unfortunately it does not yet have the flexibility of the standard grid.

OTHER TIPS

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.

Have you tried it in an empty project without any user controls , masterpages and inheritance ? If there where no possible properties to do that , I think you can do this job by conditional code .

I had a simillar issue with ComponentArt's grids, and If I understand you then maybee this will help.

What I had to do was limit the height of the grid by putting it in my own Div, which had overflow-y scrollable. So I had this:

Do not specify a height on the grid at all.

Edit

You need to set a set a specific height on your div I think.

<table style="height:500px">
   <tr>
      <td>Cell 1</td>
      <td>Cell 2</td>
   </tr>
   <tr>
      <td>
         <div style="height:400px;overflow-y:scrollable"> <ingragists...>
         </div>
       </td>
       <td>Cell 3</td>
    </tr>
</table>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top