Hi!
I noticed some display differences for the grid. In In the compatibility mode of Internet Explorer versions #8 and 9, the scroll bar extends all the way to the far right, even though the grid doesn’t have enough data to extend that far. If I take it out of compatibility mode, in Internet Explorer version #9, the scroll bar starts out next to the grid, like it should, but, after a post-back or something, the columns get wide enough so that the grid fills the whole screen. That doesn’t happen in Internet Explorer version #8. We can’t ensure which browser version our clients use (other than saying that they should use Internet Explorer), so is there any way around this? Has anyone else noticed similar problems? Thanks!
Holly
5 Answers, 1 is accepted
Most probably you have MasterTableView Width set to 100% in your project. If so, remove the Width property and see if it makes any difference. Also make sure that the total column widths does not exceed the grid width if you want to avoid appearance of horizontal scrollbar.
Kind regards,
Pavlina
the Telerik team
Dear Pavlina,
Hi! Actually, I don’t have the MasterTableView Width set to anything. (Setting it to 100% makes the columns be wide the whole time, not just after a post-back.) I do have the HeaderStyle and ItemStyle Widths to be 100 pixels, though, because I want the column widths to always be that size. I found they were sometimes too small by default if there were a lot of columns. We populate the grid dynamically, so I’ll just show you the ASP code for the grid:
<Telerik:RadGrid ID="RadGrid1" runat="server" GridLines="Both" CellSpacing="0" CellPadding="2" Width="100%" Height="450px">
<MasterTableView>
<HeaderStyle Width="100px" />
<ItemStyle Width="100px" />
</MasterTableView>
<ClientSettings>
<Scrolling FrozenColumnsCount="2" AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true">
</Scrolling>
<Resizing AllowColumnResize="true" ClipCellContentOnResize="true" />
</ClientSettings>
</Telerik:RadGrid>
Also, it’s not the horizontal scroll bar that I don’t want. The vertical scroll bar is actually placed too far to the right. It’s not right next to the grid, although we do also have a problem with the horizontal scroll bar not showing up in IE versions #8 and 9. It’s like the grid extends past the current page, but there’s no scroll bar to let you see the rest of the data. (Also, we want the scroll bar, but we don’t want to have to scroll the page, just the grid.)
Thanks so much for your help!
Holly
Note that it is not recommended to use ItemStyle.Width property for setting column widths. Only HeaderStyle.Width should be used. Try to remove the ItemStyle.Width from your code and let me know if this helps to resolve the described problems:
<
Telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
GridLines
=
"Both"
Width
=
"100%"
Height
=
"450px"
>
<
MasterTableView
TableLayout
=
"Fixed"
>
<
HeaderStyle
Width
=
"100px"
/>
</
MasterTableView
>
<
ClientSettings
>
<
Scrolling
FrozenColumnsCount
=
"2"
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
SaveScrollPosition
=
"true"
>
</
Scrolling
>
<
Resizing
AllowColumnResize
=
"true"
ClipCellContentOnResize
=
"true"
/>
</
ClientSettings
>
</
Telerik:RadGrid
>
Greetings,
Pavlina
the Telerik team
Dear Pavlina,
Hi! I tried adding in the TableLayout="Fixed" to the MasterTableView and deleted the ItemStyle width, but it’s still doing the same things, unfortunately.
Holly
At this point it will be best if you open a formal support ticket and send us a sample runnable project which demonstrates the differences in the browsers. Providing a live url will also help to investigate the problem. Once we replicate the problem we could provide additional information.
Thank you for your cooperation.
All the best,
Pavlina
the Telerik team