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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to use the superscript option for the text box cell in the WinForms GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl
Tags: styling, richtext


You can use Superscript by setting the CellType to RichText and setting cellvalue as RTF text.


void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
    if (e.TableCellIdentity.Column != null && e.TableCellIdentity.Column.Name == "City"
        && e.TableCellIdentity.DisplayElement.Kind == Syncfusion.Grouping.DisplayElementKind.Record)
        string rtf = @"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 Syncfusion\up15 2\up0\par}";
        //declare celltype as RichTextBox
        e.Style.CellType = GridCellTypeName.RichText;
        e.Style.CellValue = rtf;


Private Sub gridGroupingControl1_QueryCellStyleInfo(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs)
    If e.TableCellIdentity.Column IsNot Nothing AndAlso e.TableCellIdentity.Column.Name = "City" AndAlso e.TableCellIdentity.DisplayElement.Kind Is Syncfusion.Grouping.DisplayElementKind.Record Then
        Dim rtf As String = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 Syncfusion\up15 2\up0\par}"
        'declare celltype as RichTextBox
        e.Style.CellType = GridCellTypeName.RichText
        e.Style.CellValue = rtf
    End If
End Sub

The following screenshot displays the Grid after applying the properties.

Show the superscript in textbox cell


C#: Superscript

VB: Superscript

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon 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.Close Icon

Live Chat Icon For mobile