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

Layout issue with GroupHeader

2 Answers 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 05 Jan 2011, 04:52 PM
Hey Guys,

I have the following problem:

I use the RadGrid in a SharePoint webpart. Everythink is ok but, when I use the group feature in relation with static headers, there is a layout issue with the GroupHeader.
The text of the groupheader is aligned to the top so that the first groupheader overlaps with radgrid headers and the next groupheader overlaps with the groupheader before.
To solve the problem I tried to set the VerticalAlign.(radGrid.GroupHeaderItemStyle.VerticalAlign = VerticalAlign.Middle;)
The crazy think no is, that when the RadGrid gets the focus, the groupheaders will be align correct. But after grouping they will be align wrong again.
I found a thread in in the forum which describes similar problems but this could not solve the problem.
The images in the attachements shows the problem.

Please Help!


2 Answers, 1 is accepted

Sort by
0
Accepted
Pavlina
Telerik team
answered on 05 Jan 2011, 05:27 PM
Hi Jan,

This issue occurs if the page is opened in quirks mode (there is no DOCTYPE or the DOCTYPE is HTML 4.0 loose). Please try to add the following CSS rule to the page and see if it helps:
CSS:
<style type="text/css">
     
   * html .RadGrid .rgGroupHeader td div div
   {
       top:0;
   }
     
   </style>

I hope this helps.

Best wishes,
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.
0
Jan
Top achievements
Rank 1
answered on 07 Jan 2011, 03:42 PM
Thank you for your Answer!
I added the CSS-Rule into my Webpart.
Here my solution:
In the Webpart OnInit-Method:

//Add css-rule to display groupheader-text correctly in browsers quirks mode
 
LiteralControl lc = new LiteralControl();
lc.Text = "<style type=\"text/css\"> * html .RadGrid .rgGroupHeader td div div{top:0;} </style> ";
this.Page.Header.Controls.Add(lc);

Tags
Grid
Asked by
Jan
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Jan
Top achievements
Rank 1
Share this question
or