Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6149627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:29:05+00:00 2026-05-23T19:29:05+00:00

With reference to the below mentioned code block (Designer- .ASPX), I am trying here

  • 0

With reference to the below mentioned code block (Designer- .ASPX), I am trying here to bind the inner gridview with a List<> at runtime. This List<> for the inner gridview is member of datasource of outer grid.

As you can see from the design, I want to bind the inner gridview with respective datasource only after user clicks on the embedded “+” image button.

I can find the inner gridview at button click but have no idea how to persist datasource for the same. Every column will have it’s own List<> datasource, so I can’t do it with session or view state.

Can anyone let me know how can I persist it with inner gridview and will bind it at runtime after user clicks on “+” sign?

<asp:GridView ID="gvMain" runat="server" AutoGenerateColumns="false">
    <Columns>
        <asp:BoundField DataField="Name" HeaderText="Name" />
        <asp:TemplateField HeaderText="Lateral">
            <ItemTemplate>
                <asp:CheckBox ID="chkLateral" runat="server" Checked='<%# Eval("Lateral") %>' />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Types">
            <ItemTemplate>
                <table>
                    <tr>
                        <td>
                            <asp:ImageButton OnClick="imgExpandbtn_OnClick" ID="imgExpandbtn" runat="server" ImageUrl="~/Styles/Images/Plus.png" />
                            <asp:Label runat="server" ID="lblTypes" Text='<%# Eval("Types") %>'></asp:Label>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:GridView ID="gvInner" runat="server" AutoGenerateColumns="false">
                </asp:GridView>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Active">     
            <ItemTemplate>
                <%# (Boolean.Parse(Eval("IsActive").ToString())) ? "Y" : "N"%>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:29:05+00:00Added an answer on May 23, 2026 at 7:29 pm

    Are you fetching the data for inner grid along with outer grid? If yes then you should bind the inner grid when you are binding the outer grid i.e. set its data-source at design time using data binding expression. Then you should use java-script to show/hide the inner grid on click of expand/collapse button – not only this approach is simple to implement, it will save server trips on click of expand/collapse button.

    Alternatively, you may choose to bind the inner grid only when the expand button is clicked. However, in such case, it does not make sense to pre-fetch & store the inner grid’s data along with outer grid. In such scenario, you should fetch the inner grid’s data when expand button is clicked (so you don’t have to “persist data-source” because data will be fetched on-demand).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the below code, i am trying to reference an external .dll, which creates
EDIT: Added the NSRunLoop from my code, as mentioned by Deepak below. This was
This is with reference to the below question: Execute program from within a C
with the hash below, I would like the clients array's reference : my $this
I've been trying to get this code to work for hours! All I need
I was reading an article to disable validators in Javascript using below mentioned reference
I have a rails module included for reference below that I have included using
## COMMENT OUT below just for reference cursor.execute ( CREATE TABLE yellowpages ( business_id
[Update: I've found the API reference. The method used is below] <?php wp_delete_post( $postid,
For reference, the code is for the motorola 68008. Say I have code such

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.