PROJECT DESCRIPTION
This project shows how to change the sequence in which OnRowClick and OnRowSelected client events are fired in IE7 and IE8. Currently in all browsers except IE7 and IE8, when a row is clicked in the RadGrid control first the OnRowClick event is fired, then the row gets selected and OnRowSelected is fired in the end.
In IE7 and IE8 the sequence by default is reversed: First row gets selected after that OnRowSelected is fired and in the end OnRowClick is fired.
This happens because if two handlers are attached to one element, most of the browsers (Firefox, Chrome, Opera, Safari, IE9) will execute the two handlers in the same sequence as they are added. But IE7 and IE8 will execute them in reversed order.

In the example below after the user clicks on the label two alerts will be shown. In IE9 f1 will be executed first and then f2. In IE8 f1 executes after f2.

<asp:ScriptManagerID="ScriptManager1"runat="server"/>

<labelid="Label1">

Click here</label>

<scripttype="text/javascript">

$addHandler($get("Label1"), "click", f1);

$addHandler($get("Label1"), "click", f2);

function f1(eventElement) {

alert("f1 is executed");

}

function f2(eventElement) {

alert("f2 is executed");

}

</script>

Clicking on element in RadGrid and selecting it are actually independent operations. Element could be selected without clicking and could be clicked without performing selection. It all depends on the grid's settings. To achieve this behavior, a class named GridSelection is used. RadGrid itself has an instance of the GridSelection class and they both register "click" handlers on the same DOM element. As mentioned above in IE7 and IE8 this causes GridSelection class to handle "click" event first, because it registers the "click" handler after the RadGrid does.
And to change the event handling sequence we could override the initialize method of the GridSelection class. First remove the "click" event handler added by the RadGrid instance and then add it again afterwards.
In the attached project this is the code that is used:

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.