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

On rowcommand

1 Answer 380 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Azees
Top achievements
Rank 1
Azees asked on 07 Oct 2008, 11:56 AM
Hi

 Is there any Function Available in RadGrid like OnRowCommand in Normal Grid...

My Question is
 I have a checkbox in RadGrid. When i Click that Checkbox, i want to get the id of Selected row......

Can anyone help me......?

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 07 Oct 2008, 12:59 PM
Hello Azees,

1) OnRowCommand = OnItemCommand

2) You can find an example approach below:
protected void CheckBox1_CheckedChanged(object sender, EventArgs e) 
    int index = ((sender as CheckBox).Parent.Parent as GridDataItem).ItemIndex; 

<telerik:GridTemplateColumn> 
    <ItemTemplate> 
        <asp:CheckBox ID="CheckBox1" runat="server" OnCheckedChanged="CheckBox1_CheckedChanged" AutoPostBack="true" /> 
    </ItemTemplate> 
</telerik:GridTemplateColumn> 

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Azees
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or