This is a migrated thread and some comments may be shown as answers.

RagGrid headers: Static headers when scrolling vertically only

3 Answers 200 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 06 Dec 2010, 10:13 AM
Hi,

I have used UseStaticHeaders property (i.e. by setting it to "True") to ensure that grid headers don't move when one scrolls the grid upwards or downwards and users are able to tell which kind of data they are reading since the column headers are always visible and this works well.

But when I have a grid with many columns than can't fit on the screen and the horizontal scroll bar is activated, scrolling to the left or right, the headers do not move with the data columns thereby mixing up column headers as shown in the attached images.

1. grid before scrolling down.jpg: It shows the grid when "UseStaticHeaders" property is set to "true" and the grid has not been scrolled. Column headers are visible, but when one scrolls down the column headers are no longer visible as shown by "grid after scrolling down.jpg" image.

2. grid before scrolling right.jpg : It shows the grid when "UseStaticHeaders" property is set to "false" before scrolling to the right. Column headers and data columns are well aligned. But when one scrolls to the right, column headers and data are not properly aligned as shown by "grid after scrolling right.jpg " image.

How can I fix this issue such that when a user scrolls up or down, the headers always remain visible and when one scrolls to the right or left, the column headers move with their respective column headers?

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 07 Dec 2010, 01:28 PM
Hi Andrew,

I suggest that you examine this online example which handles the desired functionality and let me know what is the difference in your scenario.

Best wishes,
Pavlina
the Telerik team
Browse the vast support resources we have to jumpstart 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.
0
Andrew
Top achievements
Rank 1
answered on 07 Dec 2010, 02:18 PM
Hi,

Thanks for your response. I had looked at the demo, but after more investigation, i discovered that the problem was introduced by the solution that was provided in this forum:

http://www.telerik.com/community/forums/aspnet/grid/lookup-suggestion-box-disappears-behind-radgrid-when-inserting-a-new-item.aspx

where I had applied the following style:

/*.rgHeaderDiv
{
    overflow: visible !important;
}*/
0
Pavlina
Telerik team
answered on 09 Dec 2010, 03:45 PM
Hello Andrew,

I tried to replicate the problem with static headers, but to no avail. Please find attached to this message a sample  test project that is working as expected and let me know if its useful for you.

Kind regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jumpstart 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.
Tags
Grid
Asked by
Andrew
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Andrew
Top achievements
Rank 1
Share this question
or