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

Grid Heading are not aligned when scroll bar added into the Grid

1 Answer 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Malkiat
Top achievements
Rank 1
Malkiat asked on 09 Sep 2013, 11:12 AM
Hi Team

I m using telerik RadGrid into my website. When number of records increases into the grid I have set Scrolling property is true By which a scroll bar added into the Grid . But when scroll bar added into the grid headings are not aligned to the records. But when i set use Static header property false then it working fine. Also when i open the firebug this automatically correct . In addition it working fine IE10 but this problem occur in only FireFox and Chrome (latest).

I have attached the screen shot of grid to increase understandability . Pls reply  me as per as possible to fix this bug 


Thanks
Malkiat

1 Answer, 1 is accepted

Sort by
0
Venelin
Telerik team
answered on 12 Sep 2013, 12:00 PM
Hello Malkiat,

If you insert/delete grid items on client you need to call the .repaint() method on the grid. Inserting and deleting items changes RadGrid's structure and it needs to recalculate its metrics.

The other approach is to add the following CSS rule to your page styles:

CSS:
.MyGrid .rgDataDiv {
    overflow-y: scroll !important;
}

ASPX:

<telerik:RadGrid ID="RadGrid1" runat="server"  CssClass="MyGrid"...>
   ....
</telerik:RadGrid>

The side effect of this approach is that if the records are too few, RadGrid will still have the vertical scroll, but it cannot be scrolled. This will prevent the header misalignment.

Regards,
Venelin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Malkiat
Top achievements
Rank 1
Answers by
Venelin
Telerik team
Share this question
or