Hide the GridViewIndentCell

7 posts, 1 answers
  1. Charlie
    Charlie avatar
    24 posts
    Member since:
    Jan 2009

    Posted 02 Nov 2010 Link to this post

    I have 2 questions.
    1.)  How to hide or have the GridViewIndentCell to have 0 width using a HierarchyChildTemplate to do an Hierarchy Grid Parent-Child? (Not using RowDetails, and I have grouping disabled).  The parent and child have the same column headers (I display the parent, but I hide the child).  I want the child columns to line up with the parent headers, but I can't get rid of the GridViewIndentCell.

    2.)  How do I kept the Child Column with the same as the Parent Width if I allow the user to resize the Parent Column? 

    An extact example of each would be great.

    Thanks,

    Charlie J.
  2. Answer
    Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 03 Nov 2010 Link to this post

    Hi Charlie,

    If you want to be able to access GridViewIndentCell, you have two options:

    1.Edit the template of a GridViewRow and find the part IndentPresenter, set its Visibility property to Collapsed.
    2.Create a simple implicit style that is targeted at GridViewIndentCell and set its Visibility property to Collapsed.
    Also you can remove the default padding in HierarchicalChildPresenter in GridViewRow's template.
    Attached is a sample approach that demonstrates these techniques.
    Considering your second requirement, you may take a look at this forum thread for a reference on the same issue.


    Regards,
    Vanya Pavlova
    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. DevCraft banner
  4. Charlie
    Charlie avatar
    24 posts
    Member since:
    Jan 2009

    Posted 03 Nov 2010 Link to this post

    Thanks Vanya,

    Your sample worked fine until I added  AlternateRowStyle to the Parent Grid.  All the Alternate Rows had the GridviewIndent to show up where the other rows had it correctly removed.  You can reproduce the problem by adding  AlternateRowStyle to your Parent Grid in the sample you sent me.

    I am trying to implement Question #2 based on the Forum post you reference.  I will let you know how that turns out.

    Thanks,

    Charlie J.
  5. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 04 Nov 2010 Link to this post

    Hi Charlie,

     
    This is really strange issue. Can you please send us a small application with your custom AlternateRowStyle that demonstrates such a behaviour ?

    Sincerely yours,
    Vanya Pavlova
    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
  6. Charlie
    Charlie avatar
    24 posts
    Member since:
    Jan 2009

    Posted 04 Nov 2010 Link to this post

    Hey Vanya,

    I made a mistake and left a Setter off the Style for the GridViewRow Style.  It is working just fine now.

    Thanks,

    Charlie J.
  7. Ben
    Ben avatar
    3 posts
    Member since:
    Oct 2010

    Posted 08 Nov 2010 Link to this post

    I used option #2 to collapse the GridViewCellIndent by putting the following into my UserControl.Resources:
    <Style TargetType="telerik:GridViewIndentCell">
        <Setter Property="Visibility" Value="Collapsed" />
    </Style>

    However, it now looks a little odd because the indent cell for the group header does not have a border on the bottom when the group is expanded, but the rest of the group header does.  The code sample attached earlier in this thread (silverlightapplication169.zip) produces the same behavior, so I attached a screenshot from it.

    Is there a simple way to add a border to the bottom of this group indent cell?

    Thanks,
    Ben
  8. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 10 Nov 2010 Link to this post

    Hello Ben,


    Actually if you want to fill that space you should edit the template of GridViewGroupRow.
    There you should change the elements named IconInnerBorder and respectively IconOuterBorder and set their BorderThickness property to the bottom in the preferred way when a GridViewGroupRow is Expanded. Attached is an example that demonstrates this approach.

    If you need any additional information please let me know.

    Kind regards,
    Vanya Pavlova
    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
Back to Top
DevCraft banner