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

Setting Visibility on GridRowElement not having disired result

3 Answers 57 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gary
Top achievements
Rank 1
Gary asked on 14 Jul 2009, 09:18 PM
In a cell formatting event, I need to hide a row based on a cell value.  Here's my code:

cellElem.RowElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

However, the row is not collapsed.  It's hidden, but still takes up real estate on the grid.  I also tried setting Visibility and IsVisible on the RowInfo object and it did not product the correct behavior either.


3 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 16 Jul 2009, 04:45 PM
Hi Gary,

For hiding rows based on cell values I would suggest using the filtering mechanism of RadGridView. You can see how it works in our online documentation.
 

Greetings,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Gary
Top achievements
Rank 1
answered on 16 Jul 2009, 04:55 PM
That is not a suitable solution.  The values we base the decision to hide rows is a bit flag, so none of the comparison operations supported by filtering would work to compare against a flag.

Is it not a bug that setting the visibility to collapsed on a row does not collapse it?  This same behavior works as expected on your WPF grid, I would expect the same result on the WinForms grid.
0
Victor
Telerik team
answered on 21 Jul 2009, 09:10 AM
Hello Gary,

The required functionality could be implemented in the CustomFiltering event of RadGridView. There is a bug however which prevents the event from being fired properly. We will fix it for the upcoming service pack which is due early next month. Write back if you have other questions.

Greetings,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Gary
Top achievements
Rank 1
Answers by
Victor
Telerik team
Gary
Top achievements
Rank 1
Share this question
or