Hi Team,
We are migrated from RadGrid Migration to RadGrid Ajax suite.
We are trying to select a row and click on Accept or Reject it ,as per requirement.
Click Event is not triggered for the Accept or Reject Button of RadGrid as have observed for Click Event there is an RadGridNamespace.AsyncRequest observed in Classic Controls.
RadGrid Code For Classic Control:
<asp:ImageButton ID="AcceptButton" CausesValidation="false" CommandName="Accept" ImageUrl="~/RadControls/Grid/Skins/Test/Img/AcceptButton.gif" runat="server" />
<asp:ImageButton ID="RejectButton" CausesValidation="false" CommandName="Reject" ImageUrl="~/RadControls/Grid/Skins/Test/Img/RejectButton.gif" runat="server" />
<input name="ctl00$ContentPlaceHolder$ctl00$ctl00$masterControl$TestRadGrid$ctl01$ctl02$ctl00$AcceptButton" id="ctl00_ContentPlaceHolder_ctl00_ctl00_masterControl_TestRadGrid_ctl01_ctl02_ctl00_AcceptButton" style="border-width: 0px;" onclick="RadGridNamespace.AsyncRequest('ctl00$ContentPlaceHolder$ctl00$ctl00$masterViewControl$TestRadGrid$ctl01$ctl02$ctl00$AcceptButton', '', 'ctl00_ContentPlaceHolder_ctl00_ctl00_masterViewControl_TestRadGrid', event); return false;" type="image" src="../RadControls/Grid/Skins/Test/Img/AcceptButton.gif">
JavaScript Code:
this.Control.onclick = function() {
if (I20.Owner.Owner.Owner.EnableAJAX) {
if (I20.Owner.Owner == I20.Owner.Owner.Owner.o1o) {
RadGridNamespace.AsyncRequest(I20.UID, I20.Owner.Owner.Owner.MasterTableView.UID + "\x21" + I20.Owner.i2v.UniqueName, I20.Owner.Owner.Owner.ClientID);
} else {
RadGridNamespace.AsyncRequest(I20.UID, I20.Owner.Owner.UID + "!" + I20.Owner.i2v.UniqueName, I20.Owner.Owner.Owner.ClientID);
}
} else {
var O2j = I20.Owner.Owner.Owner.ClientSettings.PostBackFunction;
if (I20.Owner.Owner == I20.Owner.Owner.Owner.o1o) {
O2j = O2j.replace("{0}", I20.UID).replace("{1}", I20.Owner.Owner.Owner.MasterTableView.UID + "!" + I20.Owner.i2v.UniqueName);
} else {
O2j = O2j.replace("\x7b0}", I20.UID).replace("{1}", I20.Owner.Owner.UID + "!" + I20.Owner.i2v.UniqueName);
}
eval(O2j);
}
RadGrid Code For Ajax Suite after Migration :
<input name="ctl00$ContentPlaceHolder$ctl00$ctl00$masterControl$TestRadGrid$ctl01$ctl02$ctl00$AcceptButton" id="ctl00_ContentPlaceHolder_ctl00_ctl00_masterControl_TestRadGrid_ctl01_ctl02_ctl00_AcceptButton" style="border-width: 0px;" type="image" src="../RadControls/Grid/Skins/Test/Img/AcceptButton.gif">
JavaScript :
But For AjaxSuite control of RadGrid, I have changed RadGridNamespace to Telerik.Web.UI ,but still no luck.
this.Control.onclick = function() {
if (I20.Owner.Owner.Owner.EnableAJAX) {
if (I20.Owner.Owner == I20.Owner.Owner.Owner.o1o) {
Telerik.Web.UI.AsyncRequest(I20.UID, I20.Owner.Owner.Owner.MasterTableView.UID + "\x21" + I20.Owner.i2v.UniqueName, I20.Owner.Owner.Owner.ClientID);
} else {
Telerik.Web.UI.AsyncRequest(I20.UID, I20.Owner.Owner.UID + "!" + I20.Owner.i2v.UniqueName, I20.Owner.Owner.Owner.ClientID);
}
} else {
var O2j = I20.Owner.Owner.Owner.ClientSettings.PostBackFunction;
if (I20.Owner.Owner == I20.Owner.Owner.Owner.o1o) {
O2j = O2j.replace("{0}", I20.UID).replace("{1}", I20.Owner.Owner.Owner.MasterTableView.UID + "!" + I20.Owner.i2v.UniqueName);
} else {
O2j = O2j.replace("\x7b0}", I20.UID).replace("{1}", I20.Owner.Owner.UID + "!" + I20.Owner.i2v.UniqueName);
}
eval(O2j);
}
};
when we click on AcceptButton or RejectButton , page is getting Refreshed. Click event is not triggerred.
Can anyone help me to Resolve issue?