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.

How to replace the plus/minus cell of the group caption row with an empty cell when there is only one record in that group?

Description:

By default, the GridGroupingControl shows the plus/minus symbol for all the groups whether the group contains only one record or many records. When you want to hide the plus/minus symbol for the groups that have only one record, then use the following solution.

Solution:

In order to replace the Plus/Minus PushButton of the caption row, you need to handle the QueryCellStyleInfo event. In the event handler, change the PushButton CellType to Static CellType and expand the group that has only one record.

C#

VB

The following screenshot displays the plus/minus symbol hidden.

 

C:\Users\Usha Clementine\AppData\Roaming\Skype\ushah_1933\media_messaging\media_cache\^2F6C08B062C337B4D232189C8DF2B27B61678DE6BD2562D026^pimgpsh_fullsize_distr.jpg

Figure 1: Plus/Minus symbols hidden

Sample Links:

PlusMinusButtonHide-C#506051382.zip

PlusMinusButtonHide-VB390623295.zip

Article ID: Published Date: Last Revised Date: Platform: Control:
597 04/30/2011 03/06/2015 Windows Forms GridGroupingControl
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.