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 8131677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:09:22+00:00 2026-06-06T09:09:22+00:00

I have a very simple scenario but poor experience in this area and googling

  • 0

I have a very simple scenario but poor experience in this area and googling around didn’t help much.

Consider a classic ASPX page with C# code behind. Let’s say I have a list of DataTables (or a DataSet with several tables). I need the means to display all tables using one DataGrid per table.

I tried binding entire DataSet to DataGrid but it displayed only the first table.

Something tells me I should be using a Repeater in conjunction with DataGrid but I need help with this or a totally different (better) alternative.

  • 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-06-06T09:09:23+00:00Added an answer on June 6, 2026 at 9:09 am

    This is an example using dynamic controls:

    ASPX

        <asp:Panel runat="server" ID="myPanel" Width="100%">
        </asp:Panel>
        <asp:Label ID="lblMessage" runat="server" />
        <asp:Button Text="Just post" runat="server" />
    

    Code behind

        protected void Page_Init(object sender, EventArgs e)
        {
            var s1 = Builder<Product>.CreateListOfSize(5).Build();
            var s2 = Builder<Order>.CreateListOfSize(9).Build();
    
            var g1 = new DataGrid { Width = new Unit("50%"), DataSource = s1 };
            var g2 = new DataGrid { Width = new Unit("50%"), DataSource = s2 };
    
            this.myPanel.Controls.Add(g1);
            this.myPanel.Controls.Add(g2);
        }
    
        protected void Page_Load(object sender, EventArgs e)
        {
            this.DataBind();
        }
    

    Output:

    Note that the view state of each grid is kept among post backs

    enter image description here

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

Sidebar

Related Questions

I have a very simple scenario where I have a structure similar to this
we have a (in our oppinion) very simple scenario here. But we got stuck
I have a very simple scenario, using NHibernate: one abstract base class animal; two
I have a very simple scenario involving a database and a JMS in an
I have a very simple scenario which I cannot get to work. I am
I have a very simple scenario where I want to have a textbox where
I'm playing around with Razor + MVC 3 and have a really simple scenario...
It may be very simple scenario for experienced developers, but as a beginner I
I have been trying to do a very simple auditing scenario following Ayende's blog
I have (what I feel to be) a very simple scenario that I can't

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.