T
Tomk20
I've figured out how to add an edit button based on a login form but when
the user presses that edit button how to I get 2 buttons (Update & Cancel)
in the same column like it does when setup with the designer?
Private Sub DataGrid1_Init(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.Init
If Session("AdminMode") Then
'Create ID column & add to DataGrid
dgcAdmin.HeaderText = "Admin"
dgcAdmin.ButtonType = ButtonColumnType.PushButton
dgcAdmin.Text = "Edit"
dgcAdmin.CommandName = "Edit"
dgcAdmin.Visible = True
DataGrid1.Columns.AddAt(0, dgcAdmin)
End If
End Sub
the user presses that edit button how to I get 2 buttons (Update & Cancel)
in the same column like it does when setup with the designer?
Private Sub DataGrid1_Init(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.Init
If Session("AdminMode") Then
'Create ID column & add to DataGrid
dgcAdmin.HeaderText = "Admin"
dgcAdmin.ButtonType = ButtonColumnType.PushButton
dgcAdmin.Text = "Edit"
dgcAdmin.CommandName = "Edit"
dgcAdmin.Visible = True
DataGrid1.Columns.AddAt(0, dgcAdmin)
End If
End Sub