We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

GridGroupingControl - How to hide a row in GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

31667 Jul 12,2005 08:40 AM Jul 12,2005 05:59 PM Windows Forms 1
loading
Tags: GridControl
Dan Roesch
Asked On July 12, 2005 08:40 AM

Hi! Please can anybody tell me how to hide a row in a GGC? In the attached file you can see GGC with several groups. If a group is expanded you can see that the first row contains the same data as the caption row. Now I''d like to hide that row with similar data. Right now I do it like this: private void Table_GroupExpanded(object sender, GroupEventArgs e) { Group group = e.Group; GridRangeInfo gri = this.gridGroupingControlMarketData.TableModel.RecordFieldToRangeInfo( group.GetFirstRecord(), "Symbol" ); int rowIdx = gri.Top; if ( group.Records.Count > 0 ) { HideDuplicatedRow( rowIdx, true ); } } private void HideDuplicatedRow( int rowIdx, bool hide ) { GridModelHideRowColsIndexer indexer = this.gridGroupingControlMarketData.TableModel.HideRows; indexer.SetRange( rowIdx, rowIdx, hide ); } The problem is if I start at the bottom to expand the groups it hides the wrong rowa. If I begin at the top of the table it works. Thank you for your help! Dan groupinggrid_4548.zip

Administrator [Syncfusion]
Replied On July 12, 2005 05:59 PM

Hi Dan, check out the Grid\Samples\Grouping\ResizableRows example that ships with 3.2.1.0 This sample allows you to manually change the size of a row. So, what you could do is set the height of the first row in a group to 0. TableModel.HideRows will not work since that bypasses the CounterLogic used by the grouping engine and you therefore would get drawing and scrolling issues. Stefan >Hi! > >Please can anybody tell me how to hide a row in a GGC? In the attached file you can see GGC with several groups. If a group is expanded you can see that the first row contains the same data as the caption row. Now I''d like to hide that row with similar data. > >Right now I do it like this: > private void Table_GroupExpanded(object sender, GroupEventArgs e) { > Group group = e.Group; > > GridRangeInfo gri = this.gridGroupingControlMarketData.TableModel.RecordFieldToRangeInfo( group.GetFirstRecord(), "Symbol" ); > > int rowIdx = gri.Top; > > if ( group.Records.Count > 0 ) { > HideDuplicatedRow( rowIdx, true ); > } > } > > private void HideDuplicatedRow( int rowIdx, bool hide ) { > GridModelHideRowColsIndexer indexer = this.gridGroupingControlMarketData.TableModel.HideRows; > indexer.SetRange( rowIdx, rowIdx, hide ); > } > >The problem is if I start at the bottom to expand the groups it hides the wrong rowa. If I begin at the top of the table it works. > >Thank you for your help! >Dan > >groupinggrid_4548.zip > >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;