Duh..
How do I do this? CreditId is my datakey, but I can't seem to get to
it.
Dim dgItem As GridViewRow
For Each dgItem In gridEmployeeCredits.Rows
If dgItem.DataItem("CreditId") = 0 Then
Dim textboxCreditDate As TextBox =
CType(dgItem.FindControl("textboxCreditDate"), TextBox)
textboxCreditDate.Text = ""
End If
Next
Thanks.
Teresita Núñez - SorCereSs - - 06 Mar 2008 01:18 GMT
Using the GridView.SelectedValue property
you can get the data key value of the selected row in a GridView control
see here:
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.sele
ctedvalue(VS.80).aspx
Or if you want to get a collection of datakeys objects that represents the
data key value of each row in a GridView control, you can use the
GridView.DataKeys property
see here:
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.data
keys(VS.80).aspx

Signature
SorCereSs
MCTS: NET Framework 2.0 - Web-Based Client Development
MCPD: Web Developer
Microsoft Student Partner - Paraguay