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

Repeat Column Header every x rows in Grid

3 Answers 237 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John Anderson
Top achievements
Rank 1
John Anderson asked on 24 Mar 2009, 01:54 PM
Is it possible to repeat the column headers every x rows for long lists on screen?

My users deal with long lists of employees with data that changes frequently, and so they don't want to have to print out the results, but they would like to be able to pull up the data, and quickly scroll down the long list on screen.  However, some of the columns have similar data in them next to each other, and it is hard to remember which column is which when halfway down the page.

So what I'm looking for is a way to have the column headers automatically repeat every x rows.

And what would be the icing on the cake is that those repeated column headers would not show up when printed.

Thanks,

John

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Mar 2009, 04:45 AM
Hi John,

One better idea will be to make the column headers static so that the headers will fixed on the top of the Grid and will not move while scrolling.

ASPX:
  
<ClientSettings> 
     <Scrolling  UseStaticHeaders="true" AllowScroll="true" /> 
  </ClientSettings> 

You can also check the online demo where you can see the static header behavior.
http://demos.telerik.com/aspnet-ajax/grid/examples/client/scrolling/defaultcs.aspx

Shinu
0
John Anderson
Top achievements
Rank 1
answered on 25 Mar 2009, 01:10 PM
Oops.

I should have explained that I had already ruled out scrolling with static headers, as due to the number of columns on the page, enabling scrolling with the static headers caused the table to end up wider than the page and the frame had horizontal and vertical scroolbars.  Not acceptable.

Thanks for the suggestion though.

John
0
Yavor
Telerik team
answered on 27 Mar 2009, 10:50 AM
Hi John,

You can actually try setting the widths for the control, or the individual columns explicitly, to work-around this issue. Thus, you can have a setup similar to the original one, but with scrolling, which keeps the headers static. I hope this is a feasible option.

Regards,
Yavor
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
John Anderson
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
John Anderson
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or