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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:38:09+00:00 2026-05-14T23:38:09+00:00

I have a user control…and the base page(s) which uses this user control has

  • 0

I have a user control…and the base page(s) which uses this user control has a dataset which will be used by the user control.

My dataset is dynamic…means..it can have different number of columns depending upon which page my usercontrol is implemented. Is there any control in wpf which i can use to bind this dataset (without knowing the column information) …i mean similar to datagrid/gridview in 2.0 ?

  • 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-14T23:38:10+00:00Added an answer on May 14, 2026 at 11:38 pm

    Take a look at the WPF toolkit, this contains a Grid which meets your requirements.

    This toolkit is built by Microsoft, and part of the Microsoft Shared Source Initiative (see the link I provided).

    It’s not supported my Microsoft though, so if you get a bug you can use their forums but not call MS support.

    If you do want to do it yourself, you can for example write some code that takes a List<T>, you get the generic type, get the properties, iterate over them, write the column headers, iterate over all the items in the list and write all the properties.

    I wrote this code a while back to write a List to an HTML table, I hope it’s useful:

    public void PrintList<T>(List<T> list)
    {
        if(null!=list.FirstOrDefault())
        {
           Type t = typeof(list[0]);
           PropertyInfo[] properties = t.GetProperties();
    
           // properties = list of all properties.
    
           print("<table><tr>");
    
           foreach(var property in properties)
           {
              // print property title
              print(string.Format("<th>{0}</th>", property.Name));
           }   
    
    
           print("</tr>");
    
           foreach(var item in list)
           {
              print("<tr>");
              foreach(var property in properties)
              {
                   var propertyValue = t.InvokeMember(property.Name, BindingFlags.GetProperty, null, item, new object[] {});
                   print(string.Format("<td>{0}</td>", propertyValue));
              }
    
              print("</tr>");
           }
    
           print("</table>");
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have user control named DateTimeUC which has two textboxes on its markup: <asp:TextBox
I have user control on a ASP.NET web page, which contains a GridView and
I have a user control in a master page and the same user control
I have user control inside a page with single repeater. The problem is when
I have user control in which there are text boxes no i am using
I have user control that inherits a base control class and these user controls
i have user control, which i render on several views. i want to show
I have user control under Sitecore CMS. It has some controls bound to some
I have a user control which contains the following code: <form id=CurrencyForm method=post runat=server>
I have user control that i wrote. this user control is appear on some

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.