Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Master/Details Gridview

Master/Details Gridview

Scheduled Pinned Locked Moved ASP.NET
databasesaleshelpquestionworkspace
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    ffowler
    wrote on last edited by
    #1

    Hello All, I've run into a problem I need some assistance with. I have 2 gridviews on a webform. The first one displays some master information (customer id, order, etc). The gridview is setup to allow selections. My plan is to display the details in another gridview depending on the selected line. The problem that I am having is that I need to have 4 elements to perform the stored procedure to display the details. I setup gridview1 to have the 4 elements as "DataKeyNames" and I setup Gridview2 to use Gridview1 as the origin for the elements (Control --> Gridview1). I have no problem displaying details if there is only one element needed (another stored procedure) but I want to drill down further so I have defined the 4 elements. How can I get gridview2 to display the details provided by gridview1. As always, Thanks in advance for any assistance.

    F 1 Reply Last reply
    0
    • F ffowler

      Hello All, I've run into a problem I need some assistance with. I have 2 gridviews on a webform. The first one displays some master information (customer id, order, etc). The gridview is setup to allow selections. My plan is to display the details in another gridview depending on the selected line. The problem that I am having is that I need to have 4 elements to perform the stored procedure to display the details. I setup gridview1 to have the 4 elements as "DataKeyNames" and I setup Gridview2 to use Gridview1 as the origin for the elements (Control --> Gridview1). I have no problem displaying details if there is only one element needed (another stored procedure) but I want to drill down further so I have defined the 4 elements. How can I get gridview2 to display the details provided by gridview1. As always, Thanks in advance for any assistance.

      F Offline
      F Offline
      ffowler
      wrote on last edited by
      #2

      With diligence I was able to figure this issue out. I am using and SQLDataSource as the object to run my SP. Under the "Define Parameters" section of the wizard, I had to define each parameter with "GridView1.SelectedDataKey[0-3]" instead of "SelectedValue". I found this under the advance properties link. The SelectedDataKey[n] value corresponds to the enumeration of the values passed from GridView1 Just an FYI to anyone else who may run into this issue. Thanks

      E 1 Reply Last reply
      0
      • F ffowler

        With diligence I was able to figure this issue out. I am using and SQLDataSource as the object to run my SP. Under the "Define Parameters" section of the wizard, I had to define each parameter with "GridView1.SelectedDataKey[0-3]" instead of "SelectedValue". I found this under the advance properties link. The SelectedDataKey[n] value corresponds to the enumeration of the values passed from GridView1 Just an FYI to anyone else who may run into this issue. Thanks

        E Offline
        E Offline
        El_Programmer
        wrote on last edited by
        #3

        hi, i had this issue too, i figured out it with this article : Editable Nested GridView (All-in-One)[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups