Master/Details Gridview
-
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.
-
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.
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
-
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
hi, i had this issue too, i figured out it with this article : Editable Nested GridView (All-in-One)[^]