Articles in this section
Category / Section

How to display the values of '0' as a blank field in the SummaryRow?

1 min read

 

QueryCellStyleInfoEvent should be used to display the SummaryRow cell value as blank field whose value is '0'.

C#

void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)

{

if (e.TableCellIdentity.TableCellType == GridTableCellType.SummaryFieldCell)

{

//Check the value of GroupCaptionSummaryCell. If the value is "0" then change the e.Style.Text

if (e.Style.Text == "0")

{

e.Style.Text = " ";

}

}

}

VB

Private Sub GridGroupingControl1_QueryCellStyleInfo(ByVal sender As Object, ByVal e As GridTableCellStyleInfoEventArgs)

If e.TableCellIdentity.TableCellType = GridTableCellType.SummaryFieldCell Then

'Check the value of GroupCaptionSummaryCell. If the value is "0" then change the e.Style.Text

If e.Style.Text = "0" Then

e.Style.Text = " "

End If

End If

End Sub

Sample:

http://help.syncfusion.com/support/samples/kb/Grid.Web/6.1.0.34/GGCSummary/Summary.zip

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