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

ClientEvents OnRequestStart missing

6 Answers 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
macy
Top achievements
Rank 1
macy asked on 08 Mar 2010, 10:24 AM
Hi

I will work with 

<

 

ClientEvents OnRequestStart="gridRequestStart" />

But i get the Message "...is not a valid Attribut

i am working on Version

2009.3.1314.35

Regards
Markus

 

6 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 08 Mar 2010, 10:45 PM
Hello Markus,

Please copy this code-snippet to your project and let me know whether the problem still occurs.
<script type="text/javascript">
    function requestStart(sender, args)
    {
        alert("Request Start!");
    }
</script>
 
<telerik:RadAjaxManager
   ID="RadAjaxManager1"
   runat="server"
   ClientEvents-OnRequestStart="requestStart">
   ....
</telerik:RadAjaxManager>



Kind regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
macy
Top achievements
Rank 1
answered on 09 Mar 2010, 06:06 AM
Hi
I found another solution. But the Message is from the compieler, not on run.

It seems that the Grid does not know this Event no more.

Regards
Markus

0
Accepted
Daniel
Telerik team
answered on 10 Mar 2010, 09:38 PM
Hello Markus,

This event is no longer part of RadGrid since the built-in AJAX support was removed. You can wire onRequestStart event on the relevant AJAX controls instead (RadAjaxManager, RadAjaxPanel):
Migration from RadGrid for ASP.NET To ASP.NET AJAX
RadAjax for ASP.NET vs RadAjax for ASP.NET AJAX

AJAX Manager help topic
AJAX Panel help topic 

Regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
BesT LoLo
Top achievements
Rank 2
answered on 06 Mar 2015, 11:46 PM
Hello Daniel;

How can i get elementID that raised the event?.


Thanks on advance.
0
BesT LoLo
Top achievements
Rank 2
answered on 07 Mar 2015, 12:00 AM
Hi Daniel

I'm sorry i didn't see your last post, again thanks :)
0
Sachita
Top achievements
Rank 1
Iron
Iron
Iron
answered on 21 May 2021, 07:02 AM

Hi Team,

I am working on Telerik R3 2020.3.915.45 with .NetFramework 4.8.

I am having issue with RadGrid Client Events followed the steps with Migration from RadGrid for ASP.NET To ASP.NET AJAX.

But Still ClientEvents are not getting fired.

<script type="text/javascript">
    var _pendingItemDetailWindowActive = false;
    var sortColumnHash = [];

    function PendingItemDetailWindowOver() { _pendingItemDetailWindowActive = true; }

    function PendingItemDetailWindowOut() { PendingItemDetailWindowClose(); }

    function PendingItemRowMouseOut(rowIndex) {
        this.Rows[rowIndex].Control.style.backgroundColor = "";
    }

    function PendingItemRowMouseOver(rowIndex) {
        if (this.Rows[rowIndex].Control.className.indexOf("disabled") == -1) {
            this.Rows[rowIndex].Control.style.backgroundColor = "#DFDFDF";
            this.Rows[rowIndex].Control.style.cursor = "hand";
        }
    }

    function PendingItemRowSelecting(row) {
        if (row.Control.className.indexOf("disabled") != -1)
            return false;
    }

    function PendingItemRowSelected(row) {
        var radWindow = test.Utilities.WindowUtil.openRADWindow("PendingItemEditWindow", "Portlets/ConnectDataQualityManager/PendingItemEdit.aspx?id=" + row.KeyValues["Guid"]);
        radWindow.Restore();

        var close = document.getElementById("CloseButton" + radWindow.Id);
        close.onclick = CloseRadWindow;
    }

    function CloseRadWindow() {
        if (confirm("Clicking OK will close the Detail Window. Warning: Any selections that have been made will be lost. Click Cancel to return to the Detail window.")) {
            test.Utilities.WindowUtil.closeRADWindow("PendingItemEditWindow");
        }
    }

    function PendingItemEditWindowCallBack(radWindow, returnValue) {
        if (returnValue == "Canceled" || returnValue == "Accepted" || returnValue == "Rejected")
            RebindPendingItemRadGrid();
    }

    function PendingItemEditWindowClose() {
        RebindPendingItemRadGrid();
    }

    function PendingItemDetailWindowOpen(source, key) {
        var radWindow = test.Utilities.WindowUtil.openRADWindow("PendingItemDetailWindow", "Portlets/ConnectDataQualityManager/PendingItemDetail.aspx?id=" + escape(key));

        var contentFrame = radWindow.GetContentFrame();
        contentFrame.onmouseover = PendingItemDetailWindowOver;
        contentFrame.onmouseout = PendingItemDetailWindowOut;

        var position = FindPendingItemDetailWindowPosition(source);
        radWindow.MoveTo(position[0] + 30, position[1] - 300); //+ source.offsetHeight);
        radWindow.SetSize(600, 300);

        _pendingItemDetailWindowActive = true;
    }

    function PendingItemDetailWindowClose() {
        setTimeout("PendingItemDetailWindowEvalClose()", 1000);
        _pendingItemDetailWindowActive = false;
    }

    function PendingItemDetailWindowEvalClose() {
        if (!_pendingItemDetailWindowActive) {
            test.Utilities.WindowUtil.closeRADWindow("PendingItemDetailWindow");
        }
    }

    function FindPendingItemDetailWindowPosition(obj) {
        var left = 0;
        var top = 0;
        if (obj.offsetParent) {
            left = obj.offsetLeft;
            top = obj.offsetTop;
            while (obj = obj.offsetParent) {
                left += obj.offsetLeft;
                top += obj.offsetTop;
            }
        }
        return [left, top];
    }

    function OnSelectCheckBoxClick(source) {
        var masterCheckBox = document.getElementById(selectCheckBoxes[0]);
        if (source == masterCheckBox) {
            for (i = 1; i < selectCheckBoxes.length; i++) {
                var checkBox = document.getElementById(selectCheckBoxes[i]);
                checkBox.checked = masterCheckBox.checked;
            }
        } else {
            var check = true;
            for (i = 1; i < selectCheckBoxes.length; i++) {
                var checkBox = document.getElementById(selectCheckBoxes[i]);
                if (!checkBox.checked)
                    check = false;
            }
            masterCheckBox.checked = check;
        }
    }

    function ClearSortColumns() {
        for (var key in sortColumnHash) {
            sortColumnHash[key].element.onclick = "";
        }
    }

    function RestoreSortColumns() {
        for (var key in sortColumnHash) {
            sortColumnHash[key].element.onclick = sortColumnHash[key].onclick;
        }
    }
    function PendingItemRadGridRequestStart() {
        ClearSortColumns();
        var radWindow = test.Utilities.WindowUtil.openRADWindow("PendingItemProcessingWindow", 'Portlets/Processing.htm');
        radWindow.Center();
    }

    function PendingItemRadGridRequestEnd() {
        RestoreSortColumns();
        ResetSkipCheckForRelatedDeletedLocationsHiddenField();

        test.Utilities.WindowUtil.closeRADWindow("PendingItemProcessingWindow");
        if (itemsWithRelatedDeletedLocations != '')
            ShowAcceptDeletedLocationsWindow();
    }

    function ResetSkipCheckForRelatedDeletedLocationsHiddenField() {
        document.getElementById('<%= SkipCheckForHiddenField.UniqueID %>').value = '';
    }

    function ShowAcceptDeletedLocationsWindow() {
        var radWindow = test.Utilities.WindowUtil.openRADWindow('PendingItemAcceptDeletedLocationsWindow', 'Portlets/AcceptDeletedLocations.aspx');

        var close = document.getElementById("CloseButton" + radWindow.Id);
        close.onclick = function() {
            var radWindow = test.Utilities.WindowUtil.getRADWindow("PendingItemAcceptDeletedLocationsWindow");
            radWindow.Argument = 'Canceled';
            radWindow.Close();
        };
        var form = GetForm();
        form.submit();
    }

    function GetForm() {
        var formId = 'form2';
        var form = document.getElementById(formId);

        if (!form) {
            var form = document.createElement('form');
            form.id = formId;
            form.method = 'post';
            form.target = 'PendingItemAcceptLocationsWindow';

            var field = document.createElement('input');
            field.name = 'AcceptLocationsHiddenField';
            field.type = 'hidden';
            form.appendChild(field);

            var firstForm = document.forms[0];
            var firstFormNextSibling = firstForm.nextSibling;
            var parent = firstFormNextSibling.parentNode;
            parent.insertBefore(form, firstFormNextSibling);
        }

        form.getElementsByTagName('input')[0].value = itemsWithRelatedDeletedLocations;
        form.action = 'Portlets/AcceptDeletedLocations.aspx';

        return form;
    }

    function PendingItemAcceptDeletedLocationsWindowClose() {
        var radWindow = test.Utilities.WindowUtil.getRADWindow("PendingItemAcceptLocationsWindow");
        var result = radWindow.Argument;
        if (result == 'Accepted') {
            test.$("<%= SkipCheckForRelatedDeletedLocationsHiddenField.UniqueID %>").setValue('true');
            test.$(clickedButtonName).click();
        }
    }

    (function() {
        function isSortColumn(el) { return el.title == "Click here to sort"; }

        test.$(YAHOO.util.Dom.getElementsBy(isSortColumn, "span")).batch(function(el) {
            sortColumnHash[el.innerHTML] = { element: el, onclick: el.onclick };
        });

    })();
</script>
<telerik:radwindowmanager id="PendingItemWindowManager" Skin="Sample" UseEmbeddedScripts="false" runat="server" >
    <windows>
        <telerik:radwindow id="PendingItemDetailWindow" Behavior="None" Height="300px" Modal="false" Title="Quick View" Width="600px" runat="server"></telerik:radwindow>
        <telerik:radwindow id="PendingItemEditWindow" Behavior="Maximize,Close" Height="500px" Modal="true" OnClientClose=" PendingItemEditWindowClose " Title="Detail View" Width="960px" runat="server"></telerik:radwindow>
        <telerik:radwindow id="PendingItemProcessingWindow" Behavior="None" Height="160px" Title="" Width="300px" runat="server"></telerik:radwindow>
        <telerik:RadWindow ID="PendingItemAcceptDeletedLocationsWindow" Behavior="Close" Height="315px" Width="450px" Modal="true" OnClientClose=" PendingItemAcceptDeletedLocationsWindowClose " runat="server" />
    </windows>
</telerik:radwindowmanager>
<asp:CustomValidator ID="PendingItemCustomValidator" Display="None" runat="server" />


  <telerik:RadAjaxManager ID="RadAjaxManager1"  runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="PendingItemRadGrid"/>
                </AjaxSettings>
      <ClientEvents OnRequestStart="PendingItemRadGridRequestStart" OnResponseEnd="PendingItemRadGridRequestEnd" />
 </telerik:RadAjaxManager>     



<telerik:RadGrid ID="PendingItemRadGrid" AllowCustomPaging="true" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" 
              AutoGenerateColumns="False" GridLines="none"
              GroupingSettings-CaseSensitive="false" PageSize="50" Skin="test" MasterTableView-SkinID="Default" EnableEmbeddedSkins="false"
              ShowGroupPanel="false" UseEmbeddedScripts="false" Width="100%" runat="server">
    <SortingSettings SortedAscToolTip="Sorted Ascending" SortedDescToolTip="Sorted Descending" />

    <MasterTableView CommandItemDisplay="Top" DataKeyNames="Guid" EnableViewState="false" Width="100%" AllowNaturalSort="false">

    </MasterTableView>
    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>

        <ClientSettings AllowColumnHide="false"  AllowColumnsReorder="false" AllowDragToGroup="false" 
                    AllowGroupExpandCollapse="false" AllowKeyboardNavigation="false" AllowRowHide="false" 
                     ReorderColumnsOnClient="false" EnablePostBackOnRowClick="true">
        <ClientEvents OnRowMouseOut="PendingItemRowMouseOut" OnRowMouseOver="PendingItemRowMouseOver" OnRowSelected="PendingItemRowSelected" OnRowSelecting="PendingItemRowSelecting" />

        <Resizing AllowRowResize="false" AllowColumnResize="false" ClipCellContentOnResize="false" EnableRealTimeResize="false" ResizeGridOnColumnResize="False" />
        <Scrolling AllowScroll="false" SaveScrollPosition="false" />

        <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
    </ClientSettings>
</telerik:RadGrid>

 

Can anyone please help on the issue?

                                            
Tags
Grid
Asked by
macy
Top achievements
Rank 1
Answers by
Daniel
Telerik team
macy
Top achievements
Rank 1
BesT LoLo
Top achievements
Rank 2
Sachita
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or