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

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

5 Answers 119 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 25 May 2012, 07:47 AM
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

5 Answers, 1 is accepted

Sort by
0
Smith
Top achievements
Rank 1
answered on 25 May 2012, 11:09 AM
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 :)
0
Michael
Top achievements
Rank 1
answered on 25 May 2012, 12:53 PM
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
0
Boryana
Telerik team
answered on 30 May 2012, 11:51 AM
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 >>
0
Michael
Top achievements
Rank 1
answered on 01 Jun 2012, 11:17 AM
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
0
Boryana
Telerik team
answered on 06 Jun 2012, 02:24 PM
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 >>
Tags
GridView
Asked by
Michael
Top achievements
Rank 1
Answers by
Smith
Top achievements
Rank 1
Michael
Top achievements
Rank 1
Boryana
Telerik team
Share this question
or