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.

Mixing Groups and Individual Rows

Thread ID:

Created:

Updated:

Platform:

Replies:

15398 Jun 17,2004 03:44 AM Apr 21,2006 12:43 AM Windows Forms 4
loading
Tags: Grouping
Administrator [Syncfusion]
Asked On June 17, 2004 03:44 AM

Hello again, With the GridGrouping control is it possible to have a mixture of groups and rows within a group. For example if you had a list of people with their favourite sport and grouped by sport, the ouput might look like this: Desired Behaviour: Group By: Sport Name Age ==== === Ben 23 Fred 56 Football Lee 34 John 23 Basketball Peter 56 Paul 42 Baseball Bill 13 Andrew 53 Syncfusion GridGrouping currently seems to do this: Group By: Sport Name Age ==== === (null) Ben 23 Fred 56 Football Lee 34 John 23 Basketball Peter 56 Paul 42 Baseball Bill 13 Andrew 53 As far as I can see the control would always create a seperate group for a "null" sport. Thanks, Ben.

Administrator [Syncfusion]
Replied On June 18, 2004 02:02 PM

Hi Ben, yes that is a designed behaviour. If you group by sport the grid will have two levels. The first level is a collection of groups. The second level are collection of records within each group. One idea could be to hide the caption of the first group. But there is some coding involved. Would that be that path you would be interested in? Stefan

Administrator [Syncfusion]
Replied On June 21, 2004 08:56 AM

Hi Stefan, After considering the options I decided to use the ordinary Grid control and write a custom layer that implements IBindingList, I bind the grid to this and bind my layer to the dataset. It appears to work well although I haven''t written any performance tests for it yet. The custom binding layer was required all the data, parents and children, are stored in a single table and it makes sense to keep it this way. Hiding the caption row sounds intruiging. Using a custom binder might give me a bit more flexibility. Thanks, Ben.

Siva Vasanthan
Replied On April 20, 2006 09:43 AM

Hi Stefan, This is exactly I am trying to do? Can you give a guidance or some example on how to hide the Caption of the null groups? Quick reply will be appreciated. Thanks. >Hi Ben, > >yes that is a designed behaviour. If you group by sport the grid will have two levels. The first level is a collection of groups. The second level are collection of records within each group. > >One idea could be to hide the caption of the first group. But there is some coding involved. Would that be that path you would be interested in? > >Stefan >

Administrator [Syncfusion]
Replied On April 21, 2006 12:43 AM

Hi Siva, The Caption of the null category groups can be hidden by creating a custom GroupinEngine and overriding the IsChildVisible method. Check for the group category in the override method when the element is a Caption, if it is empty then returning false will hide the Caption for the null category groups. Sample attached. Regards, Calvin.

CustomEngine1.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.

;