ItemDataBound and table that called it

2 posts, 0 answers
  1. J
    J avatar
    143 posts
    Member since:
    Jun 2006

    Posted 25 Feb 2010 Link to this post

    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
  2. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 25 Feb 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top