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

show/hide expand button

6 Answers 244 Views
GridView
This is a migrated thread and some comments may be shown as answers.
lamees
Top achievements
Rank 1
lamees asked on 28 Feb 2008, 12:34 PM
Hey,
      Can I show/hide in my hierarchial grid. I want to hide the expand/collapse button if there's no data in my child table.
thank you     

6 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 28 Feb 2008, 01:39 PM
Hello lamees,

Thank you for contacting me.

Currently we do not support this feature. We will consider adding it in our Q1 2008 release.

Do not hesitate to write me, if you need further assistance.

Sincerely yours,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
lamees
Top achievements
Rank 1
answered on 28 Feb 2008, 03:15 PM
when will be the release? I am waiting for many features in it :)
0
Jack
Telerik team
answered on 28 Feb 2008, 04:16 PM
Hello lamees,

Thank you for getting back to me.

We plan to release the Q1 2008 version of RadControls for WinForms in the beginning of April. We will highly appreciate if you send us a summary list of the features you expect to see in this release.

Let me know, if you have other questions.

Sincerely yours,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
lkeel
Top achievements
Rank 1
answered on 01 Apr 2009, 02:42 PM
I am currently running the Q1 2009 release.  Was the functionality to hide/show the plus sign ever implemented?  If so, what is the property to turn it off or how do I do it?

Thanks,
LK
0
Jack
Telerik team
answered on 02 Apr 2009, 03:06 PM
Hi lkeel,

Thank you for this questions.

Yes this functionality is available with Q1 2009 of RadControls for WinForms. You could use the code below to hide the "+" sign where no child rows are available:

void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) 
    if (e.CellElement is GridGroupExpanderCellElement && e.CellElement.RowElement is GridDataRowElement) 
    { 
        GridViewRowInfo[] rows = e.CellElement.RowInfo.ViewTemplate.ChildGridViewTemplates[0].GetChildRows(e.CellElement.RowInfo); 
        e.CellElement.ShouldPaint = rows != null && rows.Length > 0; 
    } 

I hope this helps. Should you have any other questions, don't hesitate to write us.

Best wishes,
Jack
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
lkeel
Top achievements
Rank 1
answered on 03 Apr 2009, 08:03 PM
This code segment worked great.  Thanks!
Tags
GridView
Asked by
lamees
Top achievements
Rank 1
Answers by
Jack
Telerik team
lamees
Top achievements
Rank 1
lkeel
Top achievements
Rank 1
Share this question
or