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

Hierarchy Grid Last Row

1 Answer 19 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Roland
Top achievements
Rank 1
Roland asked on 21 Oct 2013, 05:52 PM
Hi there.

How do I iterate through a Hierarchial Table and find the last row? Ive done this at the top level without DetailTables - OnPreRender I can go grab the Last GridItem and find the appropriate control and set the visibility. Thanks.

So something like -
if (rgQuestions.Items.Count > 0)
{
     GridItem gi = rgQuestions.Items[rgQuestions.Items.Count - 1];
     ImageButton btnDown = gi.FindControl("btnDown") as ImageButton;
     btnDown.Visible = false;
}

1 Answer, 1 is accepted

Sort by
0
Roland
Top achievements
Rank 1
answered on 22 Oct 2013, 12:47 AM
never mind. I got it. Based off of samples in documentation -

http://www.telerik.com/help/aspnet-ajax/grid-traversing-detail-tables-items-in-grid.html

Wire up the PreRender event of the grid, and traverse the columns. You can iterate through the GridTableView's Items and find the appropriate control necessary.
Tags
Grid
Asked by
Roland
Top achievements
Rank 1
Answers by
Roland
Top achievements
Rank 1
Share this question
or