SelfHierarchy Caption Problem

2 posts, 0 answers
  1. Barbaros Saglamtimur
    Barbaros Saglamtimur avatar
    110 posts
    Member since:
    Jul 2012

    Posted 14 Nov 2012 Link to this post

    I am using SelfHierarchy within my RadGrid and would like to add Caption to my MasterTableView. When I set the caption like;
    <MasterTableView HierarchyDefaultExpanded="false" HierarchyLoadMode="Client" AllowSorting="false"
     DataKeyNames="RowOrder, ParentId" Caption="Caption Goes Here">
    The caption is added to each details table as-well. Screen-shot is attached to see the behavior. I would like to hide caption for the details tables. How can I achieve this?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Nov 2012 Link to this post


    Please take a look into the following code snippet.

    protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
        if (e.Item is GridHeaderItem && e.Item.OwnerTableView != RadGrid1.MasterTableView)
            e.Item.OwnerTableView.Caption = "";

  3. DevCraft R3 2016 release webinar banner
Back to Top