J
John Smith
Any ideas why I wouldn't be able to return data from a cell within a
datagrid?
I am trying to get the value of a Cell within each Record by using
dgrProduction.Items(i).Cells(2).Text
But the text returns as '' eventhough the DataGrid shows the cells having a
value. As soon as I get this to work (which it has for me within other
applications), I was use the certain value returned to apply formatting to
the DataGrid. This page is a UserControl. Could that potentially be the
problem?
Sample Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
...<Populate DataGrid>...
If dgrProduction.Items.Count > 0 Then
Response.Write("DataGrid1.Items.Count: " & DataGrid1.Items.Count &
"<BR>" & vbCrLf)
Dim i As Integer
For i = 0 To (DataGrid1.Items.Count - 1)
Response.Write("Value: '" & DataGrid1.Items(i).Cells(5).Text &
"'</B><BR>" & vbCrLf)
Next
End If
End Sub
datagrid?
I am trying to get the value of a Cell within each Record by using
dgrProduction.Items(i).Cells(2).Text
But the text returns as '' eventhough the DataGrid shows the cells having a
value. As soon as I get this to work (which it has for me within other
applications), I was use the certain value returned to apply formatting to
the DataGrid. This page is a UserControl. Could that potentially be the
problem?
Sample Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
...<Populate DataGrid>...
If dgrProduction.Items.Count > 0 Then
Response.Write("DataGrid1.Items.Count: " & DataGrid1.Items.Count &
"<BR>" & vbCrLf)
Dim i As Integer
For i = 0 To (DataGrid1.Items.Count - 1)
Response.Write("Value: '" & DataGrid1.Items(i).Cells(5).Text &
"'</B><BR>" & vbCrLf)
Next
End If
End Sub