In our project we are using a splitter and inside it we are having a RadGrid on half of the part and a RadSchedular on the other half, depending on the requirement, functionality has to be something like that on Scroll of Schedular the contents of the Grid should get scrolled in parallel.
Now the following <ClientSettings >has been added for the Grid -
and on OnScroll ClientEvent the following javascript is called which is responsible for calculating the Scroll Position and binding it together
Script :
Additionaly on Page load the following script is getting called -
In the Schedular we are just including the tag OverflowBehavior="Scroll" , Now the Grid contents are succesfully getting scrolled with the Schedular scrollbar, but the mousewheel scroll is only working when the cursor is above the Schedular, how can the mousewheel scroll work for Grid as well ?
It will be very grateful if anyone can provide me help on the topic, feel free to contact me in case of any clarity is required
Now the following <ClientSettings >has been added for the Grid -
<
Scrolling
AllowScroll
=
"true"
UseStaticHeaders
=
"true"
/>
and on OnScroll ClientEvent the following javascript is called which is responsible for calculating the Scroll Position and binding it together
<
ClientEvents
OnScroll
=
"ScrollGrid"
OnColumnResized
=
"ColumnResized"
OnColumnShown
=
"ColumnShown"
/>
Script :
var
isInGridScrolling =
false
;
function
ScrollGrid(sender, args) {
var
scrollTop = args.get_scrollTop();
isInGridScrolling =
true
;
$telerik.getElementByClassName(document.body,
"rsContentScrollArea"
).scrollTop = scrollTop;
isInGridScrolling =
false
;
}
Additionaly on Page load the following script is getting called -
function
contentPageLoad() {
$addHandler($telerik.getElementByClassName(document.body,
"rsContentScrollArea"
),
"scroll"
,
function
(e) {
if
(!isInGridScrolling) {
var
RadGrid1 = $find(
"<%= SPGrid.ClientID %>"
);
RadGrid1.GridDataDiv.scrollTop = e.target.scrollTop;
}
});
In the Schedular we are just including the tag OverflowBehavior="Scroll" , Now the Grid contents are succesfully getting scrolled with the Schedular scrollbar, but the mousewheel scroll is only working when the cursor is above the Schedular, how can the mousewheel scroll work for Grid as well ?
It will be very grateful if anyone can provide me help on the topic, feel free to contact me in case of any clarity is required