This is a migrated thread and some comments may be shown as answers.

Simplest structure for an autogenerated column gridview

1 Answer 21 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Casey
Top achievements
Rank 1
Casey asked on 20 Nov 2009, 05:05 PM
I want a simple Datagrid, but I need to autogenerate the columns as they are different based on the situation..

I've tried
Lists of List,
Dictionaries of Lists,
Lists of Dictionaries...
Lists of custom objects
Dictionaries of custom objects...
etc...

but none of these seem to bind correctly as an ItemsSource.
]
Casey

 

public List<List<string>> data = new List<List<string>>(2);

 

 

public Dictionary<string, List<string>> dictDataList = new Dictionary<string, List<string>>();

 

 

public List<datatest> listdatatest = new List<datatest>();

 

 

public class datatest

 

 

 

 

{

 

public string a;

 

 

public string b;

 

 

}

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 23 Nov 2009, 07:10 AM
Hi Casey,

You can use my lightweight DataTable instead.

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Casey
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or