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

UseStaticHeaders - Header fills grid

2 Answers 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 02 Aug 2008, 11:07 PM
Hey folks, I'm hoping someone can tell me why this happens.  I already know that the grid freaks out when you use percentages and don't set fixed widths, so I won't even go there, however...

I have a grid  Height and width of both the grid and MasterTableView of h:263px, w: 750px...

The grid looks great, even with AllowScroll turned on...

HOWEVER, when I turn on UseStaticHeaders, the grid goes nuts.  Some wierd version of the grids header fills the entire grid height and width, with no column header titles visible, just the color of the header.  It appears that the grid data is there, but just smashed into an unviewable area at the bottom of the grid.

I've tried all sorts of different settings including TableLayout = Fixed, and Scrollheight, but nothing seems to make a difference.  I'd be more comfortable trying to figure this out myself, but no setting I alter seems to have any affect on the problem.

Any help would be appreciated!

Thanks, Kuba

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 04 Aug 2008, 10:08 AM
Hello Kuba,

Have you by any chance set both Height and ScrollHeight ? You'd better use only one of the two properties.

By the way, there is no rocket science in setting height in percentages. You only have to obey the following rule (it applies recursively to parent elements):

If a web page element has a height set in percent, its parent must have a height as well.

This applies to all kinds of web page elements, not just web controls, or RadGrid in particular.

Please copy/paste your RadGrid declaration here for further advice.


Sincerely yours,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
George
Top achievements
Rank 1
answered on 05 Aug 2008, 04:43 AM
Dimo,

First of all, let me apologize if I came across a bit crass.  I've always been a big supporter of Telerik controls, and use them exclusively.  I use the controls within DNN and with each release, more controls work great within DNN, but I've always come across querky things with Telerik Controls within DNN.

Now, that being said...  I am aware of what you described in your reply, and I was sure I had taken care of that.  The project I am working on is highly dynamic, so whenever a Grid is shown on a page, it is programmatically created within a central class. 

In that class, I had forgotten that we define the grids height and width.  That is sufficient for most pages, but in the case of this particular grid it was a bit different. 

Bottom line, you are correct, there was a percentage being set that I had forgotten about, so the problem was mine.  However, your response, made me stop and think what the heck I was doing wrong.  So for that, I say, Thank You!

The grid is now functioning properly.

Thanks, Kuba
Tags
Grid
Asked by
George
Top achievements
Rank 1
Answers by
Dimo
Telerik team
George
Top achievements
Rank 1
Share this question
or