I've an editable RadGrid which on edit shows a custom user control as a pop-up. The grid was embedded in an update panel and the user control used jQuery Validation plugin for validating the inputs.
I was facing issues with displaying the wait panel during ajax calls. To resolve this I removed the update panel and implemented RadAjaxManager following which the wait panel is functioning perfectly. But that broke the jQuery Validation plugin functionality. What I understand is that RadAjaxManager handles the ajax requests and doesnt trigger the events that the validation plugin is hooked to.
Is there any way of getting RadGrid + RadAjaxManager + jQuery Validation Plugin working. I do not want to do old-school way of placing custom validation code as there is extensive validation implemented using the validation plugin. Any workaround to get this working would be greatly appreciated.
Thanks in advance.
Regards.
protected void RadCombo1_ItemDataBound(object sender, RadComboBoxItemEventArgs e) { dynamic data = e.Item.DataItem; e.Item.Text = data.MyText;}//e.Item.Value = data.MyCode;
function
BannerUploaded(sender, args) {
var
ajaxmgr = $find(
"<%= RadAjaxManager1.ClientID %>"
);
var
upload = $find(
"<%= RadAsyncUploadBannerImage.ClientID %>"
);
var
Extension;
ajaxmgr.ajaxRequest(
"client1"
);
$telerik.$(
".invalid"
).html(
""
);
//Get the uploaded file ext in case the ext is different (different filename)
var
inputs = upload.getUploadedFiles();
for
(i = inputs.length - 1; i >= 0;i--) {Extension=getFileExtension(inputs[i]);}
setTimeout(
function
() {
sender.deleteFileInputAt(0);
var
mySrc = document.getElementById(
'<%= thumbnailBanner.ClientID %>'
).src;
var
FileWOExt=removeFileExtension(mySrc);
document.getElementById(
'<%= thumbnailBanner.ClientID %>'
).src=FileWOExt +
'.'
+ Extension +
"?"
+
new
Date().getTime();}, 400);
}
function
validationFailedBanner(sender, args) {
$telerik.$(
".invalid"
)
.html(
"Please choose a valid image file"
);
sender.deleteFileInputAt(0);
}
function
getFileExtension(filename) {
return
filename.split(
'.'
).pop();
}
function
removeFileExtension(filename) {
return
filename.substr(0, filename.lastIndexOf(
'.'
));
}