6 Answers, 1 is accepted
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.
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
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.
How can i get elementID that raised the event?.
Thanks on advance.
I'm sorry i didn't see your last post, again thanks :)
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?