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

RadGrid not scrolling vertically with mouse wheel

1 Answer 279 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 19 Feb 2014, 12:27 AM
I have a website that has a RadMultiPage control on the main page with 5
UserControls that wrap RadGrid's in each PageView.  Each RadGrid is set up almost identically to the rest, just with different data.  However, you can only successfully scroll the first grid vertically using the mouse scroll wheel.  The other grids have vertical scroll bars, but you can only drag their scroll bars, you can't use the scroll wheel.

Using Firebug to look into this further, it turns out that the scroll bar that works with the mouse wheel is a "VirtualScroll" scroll bar, shown here:
<div id="ctl00_MainContent_TrafficSignalsGridUserControl_RadGridTrafficSignals_GridData" class="rgDataDiv" style="overflow-x: auto; overflow-y: scroll; width: 100%; height: 474px;">
 
<div id="ctl00_MainContent_TrafficSignalsGridUserControl_RadGridTrafficSignals_ctl00_VirtualScroll" style="overflow-y: scroll; position: absolute; right: 0px; top: 0px; width: 18px; height: 458px;">

The first div tag is the RadGrid itself, and the second is the "VirtualScroll" scroll bar.  What's interesting about this is that I don't set the EnableVirtualScrollPaging
 attribute to true on any of the Grids.  The other RadGrids have a scroll bar that is inside the outer RadGrid div and is not an external div as shown above.  Here is the markup for the first grid that scrolls successfully using the VirtualScroll scrollbar and the scroll wheel:

<telerik:RadGrid ID="RadGridTrafficSignals" runat="server" 
        CssClass="gridClass"
        GridLines="None"
        AutoGenerateColumns="False"
        AllowSorting="True"
        EnableHeaderContextMenu="True"
        Width="98%" Height="636px"
        OnNeedDataSource="RadGridTrafficSignals_NeedDataSource"
        OnUpdateCommand="RadGridTrafficSignals_OnUpdateCommand"
        OnItemUpdated="RadGridTrafficSignals_ItemUpdated"
        OnDataBound="RadGridTrafficSignals_DataBound"
        OnItemCommand="RadGridTrafficSignals_ItemCommand"
        OnItemCreated="RadGridTrafficSignals_OnItemCreated"
        CellSpacing="0"
        AllowFilteringByColumn="True"
        ShowGroupPanel="True"
        ShowStatusBar="False">
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">
            <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" OnGridCreated="GridCreated" OnCommand="GridCommand"></ClientEvents>
            <Scrolling AllowScroll="True" UseStaticHeaders="True" EnableVirtualScrollPaging SaveScrollPosition="True" ScrollHeight="458px"></Scrolling>
    <Virtualization
        EnableVirtualization="true"
        ItemsPerView="100"
        LoadingPanelID="RadAjaxLoadingPanel1" />
        </ClientSettings>
...
</telerik:RadGrid>

 And here is the markup for one of the RadGrid's on which vertical scrolling with the scroll wheel doesn't work:

<telerik:RadGrid ID="RadGridDetectors" runat="server"
        CssClass="gridClass"
        GridLines="None"
        AutoGenerateColumns="False"
        AllowSorting="True"
        EnableHeaderContextMenu="True"
        Width="98%" Height="636px"
        OnNeedDataSource="RadGridDetectors_NeedDataSource"
        OnUpdateCommand="RadGridDetectors_OnUpdateCommand"
        OnItemUpdated="RadGridDetectors_ItemUpdated"
        OnDataBound="RadGridDetectors_DataBound"
        OnItemCommand="RadGridDetectors_ItemCommand"
        OnItemCreated="RadGridDetectors_OnItemCreated"
        CellSpacing="0"
        AllowFilteringByColumn="True"
        ShowGroupPanel="True"
        ShowStatusBar="False">
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">        
          <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" OnGridCreated="GridCreated" OnCommand="GridCommand" />
          <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" ScrollHeight="458px" />
              <Virtualization
                EnableVirtualization="true"
                ItemsPerView="100"
                LoadingPanelID="RadAjaxLoadingPanel1" />
</ClientSettings>

I'm stuck on what to do to resolve this, any help you can provide would be greatly appreciated!

-Chris

1 Answer, 1 is accepted

Sort by
0
Galin
Telerik team
answered on 21 Feb 2014, 03:41 PM
Hello Chris,

I prepared a sample scenario based on the provided markup and mouse wheel works as expected. Please let me know if you manage to reproduce what you are getting in this project,
and what steps to follow, so that we can test it too.

Regards,
Galin
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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Answers by
Galin
Telerik team
Share this question
or