Figured it out: Problems with empty DataGrid cell

Spoillods

New Member
If you ever have to code for Netscape like I do (argh), the following code might help. Netscape does not render empty table cells very well. So I'm appending them with empty spaces in the PreRender event (as opposed to appending to data in the dataset, performance issue).<BR><BR><BR>Sub Page_PreRender( s As Object, e As EventArgs )<BR> <BR>'* This loop appends a blank space to each field in the datagrid<BR>'* so that Netscape can render empty cells correctly for fields<BR>'* that contain no data. <BR>'* "DataGridItem" represents a row in the datagrid control.<BR><BR>Dim row As DataGridItem<BR>Dim i as Integer<BR><BR>For Each row In grdDataGrid.Items<BR><BR> For i = 0 To grdDataGrid.Columns.Count - 1<BR> row.Cells(i).Text = row.Cells(i).Text & "&nbsp;?"<BR> Next i<BR><BR>Next row<BR><BR>End Sub
 
Back
Top