Hello,
I placed a RadGrid on a page that is being refreshed by an ajax timer.
When the user wants to scroll the grid I disable the timer to prevent unexpected behaviour.
Therefore I placed a div arround the grid with an OnMouseDown event attached.
In that event I disable the timer and wire up an OnMouseUp event for document.body.
This works fine in Firefox but in IE the MouseUp event will not be fired when I click on the scrollbar of the grid.
All other locations seems to work.
How can I disable the ajax timer from script when the user scrolls the grid and reenable the timer when the user stops scrolling?
Javascript
Code behind
Regards,
Jeroen
I placed a RadGrid on a page that is being refreshed by an ajax timer.
When the user wants to scroll the grid I disable the timer to prevent unexpected behaviour.
Therefore I placed a div arround the grid with an OnMouseDown event attached.
In that event I disable the timer and wire up an OnMouseUp event for document.body.
This works fine in Firefox but in IE the MouseUp event will not be fired when I click on the scrollbar of the grid.
All other locations seems to work.
How can I disable the ajax timer from script when the user scrolls the grid and reenable the timer when the user stops scrolling?
Javascript
function Timer_Disable() {
document.body.onmouseup = Timer_Enable;
// disable the Timer so we don't refresh the page
// while the user is entering the data
var timer = $find(timerId);
timer._stopTimer();
window.status = "Refresh disabled during scrolling operation.";
}
function Timer_Enable() {
document.body.onmouseup = null;
// re-enable the Timer
var timer = $find(timerId);
timer._startTimer();
window.status = "";
}
Code behind
divTimer.Attributes.Add(
"OnMouseDown", "Timer_Disable();");
Regards,
Jeroen