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. Image for the cookie policy date

Mixing Groups and Individual Rows

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.

4 Replies

AD Administrator Syncfusion Team June 18, 2004 01: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


AD Administrator Syncfusion Team June 21, 2004 07: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.


SV Siva Vasanthan April 20, 2006 08: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 >


AD Administrator Syncfusion Team April 20, 2006 11:43 PM

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

Loader.
Live Chat Icon For mobile
Up arrow icon