Sub dgData_ItemDataBound(ByVal sender As Object, ByVal e As DataGridItemEventArgs) ' Get a count of the Cells in the current Item (Row) Dim i As Integer = e.Item.Cells.Count Dim j As Integer = 0 ' Counter variable Dim oCell As TableCell ' Enumerate the Cells in the current Item For Each oCell In e.Item.Cells If e.Item.Cells(j).Text = "0" Then e.Item.Cells(j).Text = " " End If j += 1 Next End Suband went into the HTML and put:
<!-- Added OnItemDataBound attribute to control <asp:DataGrid Id="dgData" Runat="Server" OnItemDataBound="dgData_ItemDataBound" BorderColor="Black" BorderWidth="1" Gridlines="Both" AlternatingItemStyle-BackColor="Moccasin" HeaderStyle-BackColor="#336600" HeaderStyle-ForeColor="#ffffff" HeaderStyle-Font-Bold="True" Width="75%" />Now the cells that had a zero show up blank.