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

UseStaticHeaders and Scolling

1 Answer 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alessandro
Top achievements
Rank 1
Alessandro asked on 06 Jul 2012, 09:32 AM
Hello,
I'm trying to use the Grid and enabling Scrolling.
I have this settings for scrolling:

<Scrolling ScrollHeight="120px" AllowScroll="true" UseStaticHeaders="true" />

As you can see in the attachment file, I have a "white margin" on the grid header.
if I analize the page with Firebug I see that for the <div> with class rgHeaderDiv is added a right margin of 16px.
I've tried to remove this margin with jQuery, but it seems that this margin is added dinamically and so in some cases I have that this margin is still applied.

Is there a way to fix this issue and remove this margin?
Thanks,
Alessandro

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 06 Jul 2012, 12:17 PM
Hi,

With reference to this forum thread,When using RadGrid scrolling with static headers, there is some empty space above the vertical scrollbar. By default it is filled with a background image, which is aligned if the header row is single-lined. Unfortunately, the background image cannot expand automatically to match any header row height.

Alternatively, create and apply a custom background image, adjusted to match the header row height in your specific scenario. The custom image should be set like this:

ASPX:
<telerik:RadGrid CssClass="MyCustomScrollImage" />
. . .

CSS:
div.MyCustomScrollImage .rgHeaderDiv
{
background:0 0 repeat-x url("...............") ;
}

Thanks,
Shinu.
Tags
Grid
Asked by
Alessandro
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or