dynamically adding edit, update, cancel

Discussion in 'ASP .Net Web Controls' started by Tomk20, Sep 29, 2003.

  1. Tomk20

    Tomk20 Guest

    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
     
    Tomk20, Sep 29, 2003
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U3RldmUgS2FsbGFs?=

    CssClass on DataGrid Edit, Update & Cancel buttons

    =?Utf-8?B?U3RldmUgS2FsbGFs?=, Jul 6, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    879
    =?Utf-8?B?U3RldmUgS2FsbGFs?=
    Jul 6, 2004
  2. Craig G
    Replies:
    2
    Views:
    818
    Patrick Olurotimi Ige
    Dec 14, 2004
  3. =?Utf-8?B?cG11ZA==?=

    CANT see EDIT UPDATE CANCEL Buttons for DATAGRID

    =?Utf-8?B?cG11ZA==?=, Dec 28, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,541
    =?Utf-8?B?cG11ZA==?=
    Dec 28, 2004
  4. Tomk20

    dynamically adding edit cancel update

    Tomk20, Sep 29, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    189
    Tomk20
    Sep 29, 2003
  5. Iain Porter

    multiple grids on one page - use single Update/Edit/Cancel commands

    Iain Porter, Dec 15, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    250
    Iain Porter
    Dec 16, 2003
  6. Bob Clegg

    Select then expose Edit-Update-Cancel column

    Bob Clegg, Jan 23, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    222
    Bob Clegg
    Jan 25, 2004
  7. bgledet

    Datagrid disappearing on Edit, Update, or Cancel

    bgledet, Apr 27, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    275
    Scott G.
    Apr 27, 2004
  8. Stephen

    Edit, Update, Cancel Push button question

    Stephen, Sep 7, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    233
    Stephen
    Sep 7, 2004
Loading...