I have a grid and want to freeze the columns.Please see the code snippet attached below.Freezing the columns is working fine.But my problem is when i do the horizontal scrollling then also columns are frozen, which is not supposed to happen.Please let me know how to go about this. <telerik:RadGrid ID="radgridCourseViewAPP" EnableViewState="false" ShowStatusBar="true"
HeaderStyle-Font-Bold="true"
runat="server" AutoGenerateColumns="True"
CellPadding="10" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="false"
GridLines="None" Skin="WebBlue" >
<MasterTableView TableLayout = "Auto" HeaderStyle-Width = "50">
</MasterTableView>
<ClientSettings>
<Scrolling FrozenColumnsCount="1" AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
<Resizing AllowColumnResize="True" />
</ClientSettings>
</telerik:RadGrid>
10 Answers, 1 is accepted
To have fixed headers you should set only UseStaticHeaders property to true. Note that FrozenColumnsCount property of the control determines the count of columns (starting from the leftmost column) which will be statically positioned when you drag the horizontal scroll in the grid.Therefore you have static column when scrolling.
All the best,
Pavlina
the Telerik team
As per your suggestion I have removed FrozenColumnsCount but still i am getting the same problems.Headers are fixed while doing horizontal scrolling.Please give me a solution.
One more issue is gap between horizontal scroll bar and grid.Please let me know how to fix this.Below is my code snippet.
<asp:Panel ID="pnlCourseAppTab" runat="server" >
<telerik:RadGrid ID="radgridCourseViewAPP" EnableViewState="false" ShowStatusBar="true"
HeaderStyle-Font-Bold="true" Height="400"
runat="server" AutoGenerateColumns="True"
CellPadding="10" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="false"
GridLines="None" Skin="WebBlue" >
<MasterTableView TableLayout = "Auto" HeaderStyle-Width = "50">
</MasterTableView>
<ClientSettings>
<Scrolling UseStaticHeaders="true" AllowScroll="true" SaveScrollPosition="true" />
<Resizing AllowColumnResize="True" />
</ClientSettings>
</telerik:RadGrid>
</asp:Panel>
I tried replicating the described issue but to no avail. Please examine the attached test project which is working as expected and let me know if it helps.
Additionally, note that when using RadGrid scrolling with static headers, there is some empty space above the vertical scrollbar. By default it is filled with a background image, which is aligned if the header row is single-lined. Unfortunately, the background image cannot expand automatically to match any header row height.
I suggest you to remove the background image by setting
<telerik:RadGrid CssClass="rgNoScrollImage" />
Alternatively, create and apply a custom background image, adjusted to match the header row height in your specific scenario. The custom image should be set like this:
ASPX
<telerik:RadGrid CssClass="MyCustomScrollImage" />
CSS
div.MyCustomScrollImage .rgHeaderDiv
{
background:0 0 repeat-x url("...............") ;
}
All the best,
Pavlina
the Telerik team
At this point it will be best if you open a formal support ticket and send us a simple running project (incl. CSS, images, skins, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.
Kind regards,
Pavlina
the Telerik team
Attached to this message is a simple test project with the code from the first post and everything is working as expected. Please give it a try and let me know what is the difference in your case.
All the best,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
There is no header scroll with column inside iframe after migration on new version = 2011.2.712.40.
Do you have any ideas how to resolve it?
Thanks.
Can you please specify what exactly do you mean by "There is no header scroll with column inside iframe after migration on new version = 2011.2.712.40." ?
All the best,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Hi ,
I have a rad grid with autogenerated column is true and want to freeze the 4 columns with horizontal scroll bar. The issue is scroll bar appears in bottom ONLY not in top. I want the horizontal scroll in top and bottom. Please suggest how we can implement the same in radgrid.
Also, please suggest if there is any usability improvements we can do for this type of functionality in rad grid if you think.
Thanks,
Abhinav Maheshwari