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

Radgrid Height problem with UseStaticHeaders set to false

4 Answers 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ekroy
Top achievements
Rank 1
Ekroy asked on 05 Nov 2014, 12:46 PM
I have a radgrid inside an usercontrol. I use this usercontrol for using grid on my website. I add columns dynamically from code-behind based on
my requirement of the page. I used to set UseStaticHeaders to true. Everything was working fine but I had some alignment issue with gridlines.
After searching telerik support forum I got a solution that if I set UseStaticHeaders to false then the problem will be fixed. And the problem
got fixed in my website as well. But after setting UseStaticHeaders to false the grid height is set based on the row count. When there is more data
then the grid height increases and when there is no data grid height is minimum. I want to keep the grid height constant for a certain page.
Any solution? I need help badly.

4 Answers, 1 is accepted

Sort by
0
Venelin
Telerik team
answered on 10 Nov 2014, 07:51 AM
Hello Ekroy,

You should not have any alignment problems with RadGrid with static headers feature enabled. There bust be an improper configuration, or custom styles etc. that lead to the problem. So, if you like we can discuss this first in order to resolve the issue without the need of removing the static headers.

If, however, you are okay to leave the grid without static headers and want to resolve the current issue, you need to just set AllowScroll="true" and set Height="...px" to the desired value. In this manner if the total height of all rows exceeds the height of the grid a vertical scroll will appear.

Regards,
Venelin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Ekroy
Top achievements
Rank 1
answered on 16 Nov 2014, 10:58 AM
Vanelin, 

Thanks for your reply. I was having the similar issue mentioned on the post below : 

Grid Header Alignment Problem While Fixed Header

When I group the columns in my website there creates an empty space after the last column. After grouping if I remove some columns using header context menu then I find the alignment problem like the image posted for the above issue. 

So far I have found two solutions,

1. Use static header = fasle
    This is suggested on the post I mentioned above. I know this is not a proper solution because I need the header to be static. But in my case if I set static header=false then the grid only takes the height of the rows available as data. I mean if there is 5 rows available then the grid's height is set to some value that displays the 5 rows. If I have 10 rows then the height is increased to display 10 row.

2. Set compatibility mode to IE 8
   If I set the browsers (IE) compatibility mode to IE 8 then the problem is fixed. But for my scenario this won't be a good solution. I can't do this.

Any idea for solving this issue? I need help badly
    


0
Ekroy
Top achievements
Rank 1
answered on 18 Nov 2014, 09:32 AM
After spending so many hours I have found that this problem occurs only if I use following code snippet
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

The problem is fixed if ask the browser engine to render anything but IE7. But unfortunately I have to use this setting. I have event tried with demo applications provided by telerik.
If I put this setting on demo applications I can even replicate the problem there. Do you have any solution for fixing this issue for IE7 engine?
0
Venelin
Telerik team
answered on 19 Nov 2014, 11:16 AM
Hello Ekroy,

We plan to improve that behavior in ie7 in one of our feature releases, however I can't provide an exact estimation, because  this may turn out a limitation in ie7.

Regards,
Venelin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Ekroy
Top achievements
Rank 1
Answers by
Venelin
Telerik team
Ekroy
Top achievements
Rank 1
Share this question
or