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

RadGrid frozen columns forcing scroll bar to function in scroll mode

7 Answers 279 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bryant
Top achievements
Rank 1
Bryant asked on 12 Sep 2011, 07:27 PM
In using the radgrid control we want the scroll bars to behave as if in auto mode, displaying the scroll bars when there's more data to display. However if we set one of the columns to frozen, I see that the control builds it's own horizontal scrollbar overwriting the one set by the browser. We currently use the grid allowing the users to customize the columns to be displayed, thus they are able to display fewer columns which doesn't fill their browser width. This *should* result in the scroll bar getting hidden, and in IE8 under compatibility mode it does. However for our users not using compatibility mode they continue to see the scrollbar even when there's nothing to scroll to. The scroll bar is displaying properly in that it's grayed out showing there's nothing to scroll ( basically functioning as if the scroll mode is set to overflow: scroll vice overflow: auto), however we'd like to hide the scroll bar if there is nothing to scroll to see (overflow: auto).

Thanks
Bryant

7 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 13 Sep 2011, 10:26 AM
Hello Bryant,

Please try to leave one column with no width and let me know if it helps to avoid this issue. Also can you please make sure if the problem persists when the frozen columns functionality is not enabled?

Regards,
Pavlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bryant
Top achievements
Rank 1
answered on 13 Sep 2011, 12:11 PM
Adding a column with no width doesn't resolve the problem, and yes the problem goes away when the frozen column is turned off.

I've verified that it's the telerik scroll bar at the bottom that's not getting hidden by grabing the <%Control.ID%>_Frozen DIV (which is created to display the scrollbar) and manipulating that.
0
Pavlina
Telerik team
answered on 13 Sep 2011, 01:00 PM
Hi Bryant,

Can you send me the problematic page code? You can open a formal support ticket where you could attach files.I will check them out and see what could have gone wrong and how to solve it.

Looking forward your reply,
Pavlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bryant
Top achievements
Rank 1
answered on 13 Sep 2011, 02:41 PM
Unfortunately I’m not able to grab a copy of the code and provide it. I can work later and try to produce a clean project that emulates the problem if necessary.

But it's basically just a grid that's 100% width with a set of columns with the first column frozen and static resizable headers.
0
Pavlina
Telerik team
answered on 14 Sep 2011, 02:30 PM
Hi Bryant,

Providing a live url could also help. Thus we will be able to inspect the project locally and find what causes the issue.

Greetings,
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
Bryant
Top achievements
Rank 1
answered on 14 Sep 2011, 05:42 PM
The code is on an isolated network and I can't provide a live URL for it. I have generated a solution that will emulate the problem and I am in the process of pulling out of the network.

In the mean time though, I did discover that the problem seems to exist when the RadGrid is placed within a Pane within a splitter.

In typing the code from a printout (so forgive typos) it looks something to the effect of:

<telerik:RadSplitter runat="server" width="100%" Orientation="horizontal">
  <telerik:RadPane runat="server" Scrollling="none">
    <telerik:RadGrid id="RadGrid1" runat="server" Width="100%">
       <MasterTableView AutoGenerateColumns="false">
       <Columns>
          <telerik:GridBoundColumn DataField="ID" HeaderText="ID" HeaderStyle-width="100px" />
          <telerik:GridBoundColumn DataField="Field1" HeaderText="ID" HeaderStyle-width="100px" />
          <telerik:GridBoundColumn DataField="Field2" HeaderText="ID" HeaderStyle-width="100px" />
          <telerik:GridBoundColumn DataField="Field3" HeaderText="ID" HeaderStyle-width="100px" />
          <telerik:GridTemplateColumn HeaderStyle-Width="100%" UniqueName="FillerSpan">
             <ItemTemplate>
             </ItemTemplate>
          </telerik:GridTemplateColumn>
       </Columns>
     </MasterTableView>
     <ClientSettings>
             <Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="1" />
     </ClientSettings>
    </telerik:RadGrid>


The code behind is just a datatable building a table with the columns ID, Field1, Field2, Field3 dumping dummy data into it

Page_Load
{
   DataTable tbl = new DataTable();
   tbl.Columns.Add(new DataColumn("ID", typeof(string));
   tbl.Columns.Add(new DataColumn("Field1", typeof(string));
   tbl.Columns.Add(new DataColumn("Field2", typeof(string));
   tbl.Columns.Add(new DataColumn("Field3", typeof(string));

    for ( int i = 0; i < 50; i++ )
   {
      tbl.Rows.Add(new string[] { i.ToString(), "F1 - " + i,"F2 - " + i,"F3 - " + i});
   }
   RadGrid1.DataSource = tbl;

}
0
Pavlina
Telerik team
answered on 16 Sep 2011, 04:42 PM
Hello Bryant,

Please go through the following code library, which elaborates on how to configure RadGrid to occupy 100% width/height of its container with scrolling and static headers enabled.
Setting 100% height and resize on container resize for grid with scrolling and static headers

Give it a try and let me know if further assistance is needed.

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
Tags
Grid
Asked by
Bryant
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Bryant
Top achievements
Rank 1
Share this question
or