Advertisement

05.01.2008 at 06:59AM PDT, ID: 23368492
[x]
Attachment Details

Binding nested child gridview to master gridview with ObjectDataSources

Asked by weimha in Microsoft Visual C#.Net, C# Programming Language, Programming for ASP.NET

Tags: C#, ASP.NET

I have two gridviews, one nested inside the other.  Both use objectdatasources for binding.  I am not sure how to take the value in the master gridview and place it in the paramenter for teh objectdatasource for the child gridview.

I've attached what my child objectdatasource looks like.  Right now the paramenter is set to the "SelectedValue", which gives me the same child gridview in each row.  I do I make it user the primary key of the master grid view?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
        SelectMethod="GetCustomers" TypeName="DataObject2">
        <SelectParameters>
            <asp:ControlParameter ControlID="GridView1" Name="sItemType" 
                PropertyName="SelectedValue" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
[+][-]05.01.2008 at 11:53AM PDT, ID: 21481464

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 03:27AM PDT, ID: 21485606

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, C# Programming Language, Programming for ASP.NET
Tags: C#, ASP.NET
Sign Up Now!
Solution Provided By: deepaknet
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628