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

RadGrid OnMouseUp suppressed in IE

1 Answer 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Geronimo
Top achievements
Rank 1
Geronimo asked on 14 Dec 2009, 10:14 AM
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

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

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 16 Dec 2009, 01:25 PM
Hello Jeroen,

The problem is not related to RadGrid and is caused by a limitation in Internet Explorer - the browser does not fire mouseup events when you release the mouse button over a scrollbar. You will have to think of some other way to restore the timer functionality.
All the best,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Geronimo
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or