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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:28:57+00:00 2026-06-08T19:28:57+00:00

How can i create datagridview using 4 different List. List<string> experience = new List<string>();

  • 0

How can i create datagridview using 4 different List.

List<string> experience = new List<string>();
    List<string> Cname = new List<string>();
    List<string> Clink = new List<string>();
    List<string> Ccomp = new List<string>();

I have to create four columns in datagridview based on above 4 list. How can i do that. Every List<string> content will be added to datagridview column.

  • 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-08T19:28:59+00:00Added an answer on June 8, 2026 at 7:28 pm

    You can not bind with multiple, for this you should create a collection which can store these data in a single.

    you can use DataTable or can create a class with four properties, and then make a List of that class, or you can use Tuple class if want to use predefined .net class.

    you can try this if using Tuple class, but all list must have same count.

        var list = new List<Tuple<string,string,string,string>>();
    
        for(int i=0; i<experience.Count; i++)
           list.Add(new Tuple<string,string,string,string>(experience[i],Cname[i],Clink[i],Ccomp[i]));
    
        dataGridView.DataSource = list;
    

    or for datatable you can try

    DataTable dt = new DataTable("Table");
    dt.Columns.AddRange(new DataColumn[]{ 
        new DataColumn("experience", typeof(string)),
        new DataColumn("Cname", typeof(string)),
        new DataColumn("Clink", typeof(string)),
        new DataColumn("Ccomp", typeof(string))
     });
    
    for(int i=0; i<experience.Count; i++){
       var newRow = dt.NewRow();
        newRow["experience"] = experience[i];
        newRow["Cname"] = Cname[i];
        newRow["Clink"] = Clink[i];
        newRow["Ccomp"] = Ccomp[i];
        dt.Rows.Add(newRow);
     }
    
    dataGridView.DataSource = dt;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 questions: 1- We all know that can create an array list
How can create a string in JSON after a mysql select: $ritorno = '{Prodotto:'.$riga['Prodotto'].',Prezzo:'.$riga['Prezzo'].'}'
How can create a New user in ORACLE with full access (alter, delete, select,
I can create a sparse php array (or map) using the command: $myarray =
I have a DataGridView bound to a List[of Parts]. The last item in the
I want to create a TreeView column for a DataGridView. I have followed the
I have an application with several DataGridView controls. I would like to create a
I have an unbound DataGridView with one visible field. The user can copy data,
I can create and use dynamic two dimensional array in Fortran (in 77 standard).
You can create a table model and add it to a table TableModel tm

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.