Syncfusion - GridControl - Remove Zero and Show Empty Cell

Syncfusion GridControl - Suppress Zero of all Currency Cell in GridControl

This Can be done in GridControl event  DrawCellDisplayText

Below is the Code for the same

Private Sub grdReport_DrawCellDisplayText(sender As Object, e As GridDrawCellDisplayTextEventArgs) Handles grdReport.DrawCellDisplayText
         Dim col As Integer = e.Style.CellIdentity.ColIndex
         If e.Style.CellIdentity.RowIndex > 0 Then
                 If e.DisplayText = "0.000" OrElse e.DisplayText = "0" Then
                           e.DisplayText = ""
                            e.Cancel = True
          End If
End Sub

Note : Above code will remove 0.000 or 0 with Empty string. in the gridControl.
Before the event

After the Event


Comments

Popular posts from this blog

Shared / Static Class in vb.net/C#

Xamarin Forms : PopUp Page with RG.Plugins.Popup

Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard)