Hi! I was wondering if there is any way to determine which column was clicked through the OnRowSelect event. I want to do one action for the last column, and a separate action for all the others. Is this possible?
Cole
1 Answer, 1 is accepted
0
Petur Subev
Telerik team
answered on 28 Mar 2012, 01:28 PM
Hello Cole,
You are not able to retrieve the clicked cell using the OnRowSelect event. What you can do instead is to hook another click handler to the tbody (using the OnLoad event) and check if the clicked item is in the last column.
Here is an example:
function onLoad(e) {
$("#Persons tbody").on("click", "td", function (event) {
var isLast = $(this).is(":last-child");
if (isLast) {
alert("You have clicked the last column!");
}
});
}
I hope this helps.
Regards,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.