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

Get Cell Value of Child Grid?

1 Answer 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 21 Apr 2011, 08:26 PM
I have a Hierarchal grid and in the child grid I have a template column with an imagebutton in it. When I press this button I need to get the value of a bound cell also in the child grid with the Uniquename "DocumentName" Can you give me an example of how to do this. Thanks

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 22 Apr 2011, 11:38 AM
Hello Robert,

This is the same code-snippet I posted in the support ticket.
<telerik:GridTemplateColumn>
    <ItemTemplate>
        <asp:ImageButton ID="ImageButton1" runat="server" OnClick="ImageButton1_Click"  />
    </ItemTemplate>
</telerik:GridTemplateColumn>

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
    GridDataItem item = (sender as ImageButton).NamingContainer as GridDataItem;
    string cellText = item["ColumnName"].Text;
}

For more information, please visit the following link:
Accessing cells and rows

I hope this helps.

Regards,
Daniel
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or