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

add rowclick GridTableView

1 Answer 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mabs
Top achievements
Rank 1
mabs asked on 03 Oct 2011, 04:57 PM
How would you set a row click for the gridTableView in code behind? On a 'normal' grid I would use, RadGrid1.ClientSettings.ClientEvents.OnRowClick = "RowClick", but cant see how this would be done for GridTableView?

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 06 Oct 2011, 12:51 PM
Hi Mabs,

By default the client event bubbling mechanism of Telerik RadGrid will raise all row events once for the respective row in the grid hierarchy and once for each NestedView which wraps the inner grid row. To identify the table to which the current row belongs you can use the code snippet below:
function RowClick(sender, eventArgs) {
    if (eventArgs.get_tableView().get_name() == "DetailTable") {
           //execute some custom logic here    
    }
  }

Another approach to achieve different functionality is to have RadGrid with NestedViewTemplate and to put another RadGrid in it. Thus you will have two different OnRowClick events.

Best wishes,
Andrey
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
mabs
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or