d2005
Sep 6th, 2005, 06:59 AM
update datagrid
i have the edit and cancel buttons working fine but im workin through the updat now,
i have come across the problem,
type textbox not declared, any one know a resolution,
any ideas at all would be most helpful
Private Sub CustomMsgDA1_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles CustomMsgDA1.UpdateCommand
Dim key As String = CustomMsgDA1.DataKeys(e.Item.ItemIndex).ToString()
Dim msg1, msg2 As String
Dim tb As TextBox
tb = CType(e.Item.Cells(2).Controls(0), TextBox)
msg1 = tb.Text
tb = CType(e.Item.Cells(3).Controls(0), TextBox)
msg2 = tb.Text
End Sub
i have the edit and cancel buttons working fine but im workin through the updat now,
i have come across the problem,
type textbox not declared, any one know a resolution,
any ideas at all would be most helpful
Private Sub CustomMsgDA1_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles CustomMsgDA1.UpdateCommand
Dim key As String = CustomMsgDA1.DataKeys(e.Item.ItemIndex).ToString()
Dim msg1, msg2 As String
Dim tb As TextBox
tb = CType(e.Item.Cells(2).Controls(0), TextBox)
msg1 = tb.Text
tb = CType(e.Item.Cells(3).Controls(0), TextBox)
msg2 = tb.Text
End Sub