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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:51:02+00:00 2026-05-26T21:51:02+00:00

I have a List<Collection<string>> object with 10,000 objects in it and I want to

  • 0

I have a List<Collection<string>>object with 10,000 objects in it and I want to show those strings as report(in a grid view), but binding the object directly to grid produces me no result.So can anyone help me out as to how to bind the collection of strings as different columns with the header name that I need.

  • 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-26T21:51:02+00:00Added an answer on May 26, 2026 at 9:51 pm

    You may use [] index to bind the dataSource (List of string/array) item.

    Markup:

    <asp:GridView ID="GridView1" 
                  runat="server" 
                  AutoGenerateColumns="False">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Literal 
                            ID="Literal1" 
                            runat="server"
                            Text='<%#Eval("[0]") %>'
                            >
                    </asp:Literal> 
                    <asp:Literal 
                            ID="Literal2" 
                            runat="server"
                            Text='<%#Eval("[1]") %>'
                            >
                    </asp:Literal>   
                    <asp:Literal 
                            ID="Literal3" 
                            runat="server"
                            Text='<%#Eval("[2]") %>'
                            >
                    </asp:Literal> 
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    

    Code behind:

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            List<List<string>> list = new List<List<string>>()
            {
                    new List<string>() {"A","B","C" },
                    new List<string>() { "P","Q","R"}
            };
            GridView1.DataSource = list;
            GridView1.DataBind();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a list of objects in a collection. Each object has a string
I have a List with objects. Each object has an ID. I want to
I have a collection like this List<int> {1,15,17,8,3}; how to get a flat string
I have a C# list collection that I'm trying to sort. The strings that
I have a list/collection of objects that may or may not have the same
i have some pb. I want to cast a List to Collection in java
I have List<string> collection called List<string> list . I have two threads. One thread
I have an array/list/collection/etc of objects. For sample purposes, lets assume it is just
I have a List<string> collection that I would like to bind into my ListView
I have 2 collections of caracter string ex: List<string> one = new List<string>; one.Add(a);

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.