PDA

Click to See Complete Forum and Search --> : Datagrid.Findcontrol


dgsatish
May 25th, 2005, 06:47 AM
Hi
i am having fallowing code, for datagrid findcontrol i am unable to do.i kept textbox with multiline in edit template for my comments column.can any body help me
Private Sub BTNSAVE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNSAVE.Click
Dim userid As String
Dim username As String
Dim contactid As String
Dim agentname As String
Dim comments As String
'Dim cmtdate As DateTime

For Each dgI As DataGridItem In dg.Items

userid = dgI.Cells(0).Text
username = dgI.Cells(1).Text
contactid = dgI.Cells(2).Text
agentname = dgI.Cells(3).Text

'Here below line i am unable to do.it is giving error

dgI.Cells(4).Text = DirectCast(dgI.FindControl("TXTCMTS"), TextBox)
'comments = dgI.FindControl("TXTCMTS"),Text

Call UpdateUmComments(userid, username, contactid, agentname, comments)

Next
End Sub

Thanks