Articles in this section
Category / Section

How to hide or remove the table name displayed in the GroupDropArea in WinForms GridGroupingControl?

3 mins read

Hide the table name

By default, the table name is displayed at the top left corner of the GridGroupDropArea when the data source of the GridGroupingControl has a table name.

Solution

The table name can be hidden/removed from the GridGroupDropArea by using the following ways.

1. By setting the TableDescriptor name as empty.

2. By customizing the GridGroupDropArea’s column width.

By using the TableDescriptor

C#

this.gridGroupingControl1.TableDescriptor.Name = string.Empty;

VB

Me.gridGroupingControl1.TableDescriptor.Name = string.Empty

Customizing the GridGroupDropArea’s Column width

The table can be hidden/removed by setting the column width of the table name cell as 0 by using the QueryColWidth event of the GridGroupDrop area.

C#

//Triggers the QueryColWidth event in Form()
this.gridGroupingControl1.GridGroupDropArea.Model.QueryColWidth += new Syncfusion.Windows.Forms.Grid.GridRowColSizeEventHandler(Model_QueryColWidth);
//Handles the QueryColWidth event
void Model_QueryColWidth(object sender, Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs e)
{
    //Hides the DataSource table name
    if(e.Index == 2)
    {
       e.Size = 0;
       e.Handled = true;
    }
}

VB

'Triggers the QueryColWidth event in Form()
this.gridGroupingControl1.GridGroupDropArea.Model.QueryColWidth += new Syncfusion.Windows.Forms.Grid.GridRowColSizeEventHandler(Model_QueryColWidth);
'Handles the QueryColWidth event
Private Sub Model_QueryColWidth(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs)
   'Hides the DataSource table name
   If e.Index = 2 Then
      e.Size = 0
      e.Handled = True
   End If
End Sub

Screenshot

Hide the table name

Samples:

C#: Hiding_the_Table_name_in_GridGroupDropArea_CS

VB: Hiding_the_Table_name_in_GridGroupDropArea_VB


Conclusion

I hope you enjoyed learning how to hide or remove the table name in WinForms GridGroupingControl.

You can refer to WinForms GridGrouping feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WinForms GridGrouping example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied