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

ItemDataBound and table that called it

1 Answer 24 Views
Grid
This is a migrated thread and some comments may be shown as answers.
J
Top achievements
Rank 1
J asked on 25 Feb 2010, 01:49 PM
If your using radGrid hierarchy tables, and use the event ItemDataBind, how do I determine what the table that called the event is?  Like, if I wanted to just do code associated with the top level table.

J

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 25 Feb 2010, 02:11 PM
Hello,

You can access the GridTableView object using the OwnerTableView property:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item.OwnerTableView.Name == "something")
    {
        //...
    }
}

<DetailTables>
    <telerik:GridTableView Name="something" ...>
    </telerik:GridTableView>
</DetailTables>

Regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
J
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or