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

How do I get current row index when using a templated LinkButton???

1 Answer 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 07 Aug 2008, 01:15 PM
<rad:GridTemplateColumn>
<ItemTemplate>
<asp:LinkButton runat="server" Text="Delete"
ID="lnkBtnDeleteSet"
OnClientClick="editClick(); return false;" />
</ItemTemplate>
</rad:GridTemplateColumn>

In that example, how do I get the row of the LinkButton
in the
editClick() method?

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 11 Aug 2008, 08:22 AM
Hi James,

In this scenario, you can use the onRowMouseOver client side handler for the Grid control. In this function, you can keep track, through a variable, of the index for the currently active row. In the onClick handler for the linkButton, you can access the variable, and it will keep the value of the last row over which the user hovered with the mouse.
I hope this suggestion helps.

Greetings,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or