When EnablePostBackOnRowClick="true" and clicking on the RadAutoCompleteBox inside the EditItemTemplate the Grid will make a PostBack.
This issue does not happen with other elements (span, input, button, etc).
Hello Thiyagarajan,
Thank you for reporting this issue. After checking the source code we found that the Grid's internal logic does not prevent the click event for the RadAutoCompleteBox, hence triggering a PostBack when that is clicked.
The following script overrides the Grid's internal logic and includes the RadAutoCompletBox in the condition to prevent PostBack when the element is clicked.
You can place this script anywhere on the page, but only after the ScriptManager declaration.
<script>
(function () {
try {
// store the original function in a variable
var originalClick = Telerik.Web.UI.GridSelection.prototype._click;
// override the original function
Telerik.Web.UI.GridSelection.prototype._click = function (e) {
var el = (e.target) ? e.target : e.srcElement;
// if autocompletebox do not trigger the RowClick
if (el.classList.contains('racTokenList') || el.classList.contains('RadAutoCompleteBox')) { return; }
// Call the original function
originalClick.call(this, e);
}
} catch (e) {
// oh no, the Telerik.Web.UI.GridSelection is not defined.
}
})();
</script>
Regards,
Attila Antal
Progress Telerik