Datagrid & imagebutton

Discussion in 'ASP .Net Datagrid Control' started by Alessandro, Aug 18, 2003.

  1. Alessandro

    Alessandro Guest

    I have a datagrid with a templatecolumn, in this template there are two
    imagebutton, one for modify the record, one to cancel, but i'm not able to
    retrive the unique which is memorized in a hidden column, any idea ?
    I tried to set commandargument parameter via code, but i wasn't able to
    assign it.
     
    Alessandro, Aug 18, 2003
    #1
    1. Advertising

  2. Alessandro

    Jim Mitchell Guest

    Let me know if this helps....



    Private Sub dgAccountPages_ItemCommand1(ByVal source As Object, ByVal e As
    System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
    dgAccountPages.ItemCommand

    Dim dg_index As Integer

    Dim contact_id As Integer

    Dim temp As Integer

    txtPagePick.Text = "It was clicked"

    dgAccountPages.DataKeyField = "IDofContact"

    dg_index = e.Item.ItemIndex

    contact_id = dgAccountPages.DataKeys.Item(e.Item.ItemIndex)

    txtContactID.Text = contact_id

    Select Case e.CommandSource.id

    Case "imgbtnContactNote"

    btnAddNote.Text = "Add Note"

    Case "imgbtnContactCalendar"

    btnAddNote.Text = "Add Activity"

    End Select


    "Alessandro" <> wrote in message
    news:%...
    > I have a datagrid with a templatecolumn, in this template there are two
    > imagebutton, one for modify the record, one to cancel, but i'm not able to
    > retrive the unique which is memorized in a hidden column, any idea ?
    > I tried to set commandargument parameter via code, but i wasn't able to
    > assign it.
    >
    >
     
    Jim Mitchell, Aug 19, 2003
    #2
    1. Advertising

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. Jake
    Replies:
    2
    Views:
    409
  2. mike parr

    datagrid imagebutton

    mike parr, May 20, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    2,607
    Ashish M Bhonkiya
    May 20, 2004
  3. EMW
    Replies:
    0
    Views:
    337
  4. Dave
    Replies:
    0
    Views:
    326
  5. Lars Netzel
    Replies:
    3
    Views:
    2,583
    zwitterion
    Oct 12, 2006
Loading...

Share This Page