Setting DataGrid Textbox to current date by default.
I needed to set a textbox control within a datagrid footer to display the current date by default. This is the solution I found after a little research. I used the DataGrid_ItemCreated event:
Private Sub DataGrid_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid.ItemCreated
Dim strTemp As String = "TextBox"
Dim temptext As TextBox
temptext = e.Item.FindControl(strTemp)
If Not temptext Is Nothing Then
temptext.Text = Date.Today
End If
End Sub
Yet More About TSM Integration With Data Domain
14 years ago
No comments:
Post a Comment