This is a migrated thread and some comments may be shown as answers.

[Solved] Client click on row doesn't work with new version

2 Answers 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Joan Vilariño
Top achievements
Rank 2
Joan Vilariño asked on 06 Sep 2010, 02:30 PM
Hello.

I've just updated the ASP.NET MVC components in my project to be able to use the new features and fix some of the bugs that were presnet in earlier versions.

I have some grids that I need to catch the "click" event to navigate to that row's detail form. For that I was using this code, and it worked fine:

$('#myGrid.t-grid tr').live('click', function(e) {
    if (!$(e.target).is('a')) {
        e.preventDefault();
        var row = getDataRow("#myGrid", e);
        if (row) {
            document.location.href = "http://navigate.to/form/" + row.IdTitular;
        }
    }
});

This doesn't seem to work anymore.. the click event isn't even fired.... any clue? Do you cancelBubble events or anything like that? I can't understand why is not working... tried changing "tr" to "td" in the jQuery selector... event with $('td') isn't working...

Waiting for your news ... thanks in advance!!!


2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 06 Sep 2010, 02:35 PM
Hi Joan VilariƱo,

 This code will not work only if the grid is Selectable(). If this is the case you can use the OnRowSelect event instead.

Regards,
Atanas Korchev
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
0
Joan Vilariño
Top achievements
Rank 2
answered on 06 Sep 2010, 04:12 PM
I found it out while waiting for your reply ;)

You have fixed the OnSelected event, that didn't work before with ajax enabled grids... now it works perfect!

Thanks anyway!
Tags
Grid
Asked by
Joan Vilariño
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
Joan Vilariño
Top achievements
Rank 2
Share this question
or