How to set 'GroupRowHeaders' (?) visible=false?

6 posts, 0 answers
  1. Michael
    Michael avatar
    33 posts
    Member since:
    Mar 2009

    Posted 25 May 2012 Link to this post

    Hello!

    I don't know what the name for this is, but I hope you understand.
    I want to hide the 'GroupRowHeaders'. For this, I have attached a screenshot. The red marked area shold be hidden.

    Kind regards

    Michael

  2. Smith
    Smith avatar
    8 posts
    Member since:
    Jun 2012

    Posted 25 May 2012 Link to this post

    Hi Michael,

    could you try following code?

    this.Radgridview1.ShowRowHeaderColumn = false;

    please change Radgridview1 to your Radgridview name. I tested it on my machine and it seems it's what you want :)
  3. Michael
    Michael avatar
    33 posts
    Member since:
    Mar 2009

    Posted 25 May 2012 Link to this post

    Hello!

    Thank you for your post.

    But this doesn't help. I already had this property set to false, but this will only hide the column with the "row status indicator", which shows the user, if he/she is in edit mode, if it is a new row, etc.

    Any other suggestions?

    Bye

    Michael
  4. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 30 May 2012 Link to this post

    Hi Michael,

    Thank you for writing.

    Have you tried setting the Visibility property of the GridIndentCellElement to Collapsed? Here is a sample snippet:
    void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
    {
        if (e.CellElement is GridIndentCellElement)
        {
            e.CellElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
        }
    }

    If the above suggestion does not work, I kindly ask you to open a support ticket and attach your project there. This will allow us to understand the specifics of your scenario and provide you with proper support.

    I am looking forward to your reply.

    All the best,
    Boryana
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  5. Michael
    Michael avatar
    33 posts
    Member since:
    Mar 2009

    Posted 01 Jun 2012 Link to this post

    Hello!

    Sorry that I come back late.

    Your suggestion does not what I want, because only the visiblity of column is false, but there is the still a gap between the left border of the grid and the first "real" data column.

    But you pushed me in the right direction with the event and the GridIndentCellElement-class.

    Now I implement it like this:

    private void radgridview1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
    {
        if (e.CellElement is GridIndentCellElement)
        {
            e.Column.IsVisble = false;
        }
    }

    Thank you very much.

    Nice weekend.

    Michael
  6. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 06 Jun 2012 Link to this post

    Hello Michael,

    I am glad you found a solution. Feel free to write back if you have other queries.

    All the best,
    Boryana
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top