Results 1 to 5 of 5

Thread: [2005] inserting into DB from datagrid

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    8

    [2005] inserting into DB from datagrid

    i had populated 3 colum of data into a datagrid.
    also added an extra colum for button to select the row.

    how to code such that when i select the row it will send to my database for the row of the data?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] inserting into DB from datagrid

    Handle the ItemCommand event of the gridview (Since you say VS 2005), wherein you can then find out the current row index, the corresponding data (e.Item.FindControl()), and then perform the updates to the database.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    8

    Re: [2005] inserting into DB from datagrid

    Quote Originally Posted by mendhak
    Handle the ItemCommand event of the gridview (Since you say VS 2005), wherein you can then find out the current row index, the corresponding data (e.Item.FindControl()), and then perform the updates to the database.

    its doesnt seems to regconise e.item.FindControl()

    Protected Sub GVResults_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GVResults.SelectedIndexChanged

    'Code here

    sub

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] inserting into DB from datagrid

    That's not the ItemCommand event.

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2008
    Posts
    8

    Re: [2005] inserting into DB from datagrid

    Quote Originally Posted by mendhak
    That's not the ItemCommand event.
    Sorry I am quite new to VB 2005. How to call that ItemCommand event out?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width