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

fixed header while horizontal scrolling

10 Answers 316 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pinaki Basu
Top achievements
Rank 1
Pinaki Basu asked on 01 Feb 2011, 07:55 AM
Hi ,
I have a grid and want to freeze the columns.Please see the code snippet attached below.Freezing the columns is working fine.But my problem is when i do the horizontal scrollling then also columns are frozen, which is not supposed to happen.Please let me know how to go about this. <telerik:RadGrid ID="radgridCourseViewAPP" EnableViewState="false" ShowStatusBar="true"
                         HeaderStyle-Font-Bold="true"
                         runat="server" AutoGenerateColumns="True"
                        CellPadding="10" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="false"
                        GridLines="None" Skin="WebBlue" >
                         <MasterTableView  TableLayout = "Auto" HeaderStyle-Width = "50">
                         </MasterTableView>
                         <ClientSettings>
                            <Scrolling FrozenColumnsCount="1" AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
                            <Resizing AllowColumnResize="True" />
                        </ClientSettings>
</telerik:RadGrid>


10 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 01 Feb 2011, 11:11 AM
Hello Pinaki,

To have fixed headers you should set only UseStaticHeaders property to true. Note that FrozenColumnsCount property of the control determines the count of columns (starting from the leftmost column) which will be statically positioned when you drag the horizontal scroll in the grid.Therefore you have static column when scrolling.

All the best,
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
Pinaki Basu
Top achievements
Rank 1
answered on 04 Feb 2011, 09:27 AM
Hi,

As per your suggestion I have removed FrozenColumnsCount  but still i am getting the same problems.Headers are fixed while doing horizontal scrolling.Please give me a solution.
One more issue is gap between horizontal scroll bar and grid.Please let me know how to fix this.Below is my code snippet.

 <asp:Panel ID="pnlCourseAppTab" runat="server"   >
                    <telerik:RadGrid ID="radgridCourseViewAPP" EnableViewState="false" ShowStatusBar="true"
                         HeaderStyle-Font-Bold="true"  Height="400"
                         runat="server" AutoGenerateColumns="True"
                        CellPadding="10" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="false"
                        GridLines="None" Skin="WebBlue" >
                         <MasterTableView  TableLayout = "Auto" HeaderStyle-Width = "50">
                         </MasterTableView>
                         <ClientSettings>
                            <Scrolling UseStaticHeaders="true" AllowScroll="true" SaveScrollPosition="true" />
                            <Resizing AllowColumnResize="True" />                  
                          </ClientSettings>

                    </telerik:RadGrid>
                </asp:Panel>

0
Pavlina
Telerik team
answered on 04 Feb 2011, 10:31 AM
Hi Pinaki,

I tried replicating the described issue but to no avail. Please examine the attached test project which is working as expected and let me know if it helps.

Additionally, note that 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.

I suggest you to remove the background image by setting

<telerik:RadGrid  CssClass="rgNoScrollImage" />


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("...............") ;
}

All the best,
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
Pinaki Basu
Top achievements
Rank 1
answered on 04 Feb 2011, 12:27 PM
I tried with your sample also.Even that also has the same issue with fixed header.see my attached image.When i scroll horizontally headers are fixed only the content moves.Please let me know how to go about this.
0
Pavlina
Telerik team
answered on 04 Feb 2011, 12:59 PM
Hi Pinaki,

At this point it will be best if you open a formal support ticket and send us a simple running project (incl. CSS, images, skins, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

Kind regards,
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
Andriy Mudriy
Top achievements
Rank 1
answered on 11 Aug 2011, 04:59 PM
I have the same problem. Could you explain the way to resolve it? Thanks.
0
Pavlina
Telerik team
answered on 12 Aug 2011, 02:05 PM
Hello,

Attached to this message is a simple test project with the code from the first post and everything is working as expected. Please give it a try and let me know what is the difference in your case.

All the best,
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
Andriy Mudriy
Top achievements
Rank 1
answered on 15 Aug 2011, 10:13 AM
We use Telerik.Web.UI Version=2011.2.712.40.
There is no header scroll with column inside iframe after migration on new version = 2011.2.712.40.
Do you have any ideas how to resolve it?
Thanks.
0
Pavlina
Telerik team
answered on 15 Aug 2011, 02:32 PM
Hello Andriy Mudriy,

Can you please specify what exactly do you mean by "There is no header scroll with column inside iframe after migration on new version = 2011.2.712.40." ?

All the best,
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
Abhinav
Top achievements
Rank 1
answered on 16 Mar 2017, 03:28 PM

Hi ,

I have a rad grid with autogenerated column is true and want to freeze the 4 columns with horizontal scroll bar. The issue is scroll bar appears in bottom ONLY not in top. I want the horizontal scroll in top and bottom. Please suggest how we can implement the same in radgrid.

Also, please suggest if there is any usability improvements we can do for this type of functionality in rad grid if you think.

Thanks,
Abhinav Maheshwari

 

Tags
Grid
Asked by
Pinaki Basu
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Pinaki Basu
Top achievements
Rank 1
Andriy Mudriy
Top achievements
Rank 1
Abhinav
Top achievements
Rank 1
Share this question
or