Unplanned
Last Updated: 23 May 2023 09:32 by Russ
Russ
Created on: 23 May 2023 09:32
Category: Ajax
Type: Bug Report
1
args.get_eventTargetElement() in OnRequestStart event returns null when Paging the Grid initiates an AjaxRequest via AjaxManager

args.get_eventTargetElement() in OnRequestStart event returns null when Paging the Grid initiates an AjaxRequest via AjaxManager

How do I determine if the event target is a RadGrid?

The following code leads to a JavaScript error

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" ClientEvents-OnRequestStart="requestStart">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
            </UpdatedControls>
        </telerik:AjaxSetting>

JavaScript

function requestStart(sender, args) {
    var target = args.get_eventTargetElement();
    if (target.className.indexOf("RadGrid") > -1) {
        // RadGrid control
    }
}

0 comments