Results 1 to 3 of 3

Thread: [RESOLVED] Making a DetailsView Display the Selected Row From a GridView

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2009
    Posts
    37

    Resolved [RESOLVED] Making a DetailsView Display the Selected Row From a GridView

    I need to make a DetailsView display a user-selected row from an already existing GridView. Additionally, I must also set up this web-app to not only add rows via input in textboxes, but also update or delete rows of data, as selected from the GridView... how can I configure my web-app and/or SQL Database to do all of this?
    Last edited by jwesleycooper; Dec 30th, 2009 at 12:15 PM.

  2. #2

    Thread Starter
    Member
    Join Date
    Dec 2009
    Posts
    37

    Resolved Re: Making a DetailsView Display the Selected Row From a GridView

    I managed to figure it out on my own. All I had to do was configure the DataSource from my GridView to generate Insert, Update and Delete Statements, re-use it as the DataSource for my DetailsView (enabling the insert, update, and delete features there), and finally set the DetailsView's PageIndex = to the GridView's SelectedIndex!

    It may sound like a mouthfull, but it actually took very little time, and it's working straight off!

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Making a DetailsView Display the Selected Row From a GridView

    Hey,

    Just to give you some more information on the above, even though you have now got the answer.

    Here is a walkthrough, that shows how to do part of what you asked about:

    http://msdn.microsoft.com/en-us/library/aa581796.aspx

    Gary

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