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

Is there an Interaction between OnRowClick and OnSelectedIndexChanged???

1 Answer 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 09 Feb 2012, 03:04 PM
Hi

I have a Radgrid that has had OnRowClick working for some time on the client side.

I am now trying to wire up to the Server Side OnSelectedIndexChanged as well.

However I am not getting the server event when the user clicks on a row.

I DO get the event later if I click a button outside of my grid, for instance to close the RadWindow all of this is happening in.

What am I missing?

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 09 Feb 2012, 04:24 PM
Hello,

There is no interaction between the two events.
OnSelectedIndexChanged is fired only when selection is changed.
So if you select the row, then the OnSelectedIndexChanged will be fired. But if you only click inside the grid, the event will not be fired.

Also you could set the EnablePostBackOnRowClick property (in the ClientSettings of the grid) to "True". In this case a postback will occur when you click a row. Then you could check the if the (e.CommandName  is "RowClick" in the RadGrid's ItemCommand event.

Kind regards,
Vasil
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Grid
Asked by
Tim
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or