We have a grid with quite a few columns that we want to fit into a 1024x768 screen.
The grid is inside an html table cell (for certain reasons we have to do it using html tables). The table has 4 columns, and the grid is in the second column with a colspan of 3
The problem now is, the grid goes extra long (as in wide).
As seen in the attached images, when a fixed width is specified for the grid (width=895px;) then the grid width fits, but there is a horizontal scroll bar that we don't want.
When there is no fixed width specified for the grid, then the grid goes past the width of the table/cell/etc, requiring the user to horizontally scroll on the browser window.
Screenshots were taken using IE9.
I also note that when we remove the Client Settings Scrolling AllowScroll, then it fits fine without a width specified for the grid. But obviously it would not show a specific height for the grid. Basically we want the grid to have a specific height regardless of how many rows of data it has (0, 1, 2, 400, etc).
Is there a way to get this to work?
The grid is inside an html table cell (for certain reasons we have to do it using html tables). The table has 4 columns, and the grid is in the second column with a colspan of 3
<tr> <td> </td> <td colspan="3" style="max-width:895px;"> <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="Vertical" Height="285"> <ClientSettings> <Scrolling AllowScroll="true" UseStaticHeaders="true"/> </ClientSettings> stuff ommitted for readability </td></tr>The problem now is, the grid goes extra long (as in wide).
As seen in the attached images, when a fixed width is specified for the grid (width=895px;) then the grid width fits, but there is a horizontal scroll bar that we don't want.
When there is no fixed width specified for the grid, then the grid goes past the width of the table/cell/etc, requiring the user to horizontally scroll on the browser window.
Screenshots were taken using IE9.
I also note that when we remove the Client Settings Scrolling AllowScroll, then it fits fine without a width specified for the grid. But obviously it would not show a specific height for the grid. Basically we want the grid to have a specific height regardless of how many rows of data it has (0, 1, 2, 400, etc).
Is there a way to get this to work?