0

I am trying to fill column in DataGrid from List(in one cell I want to have objects from my collection). How can I do this? Or maybe it's impossible?

1 Answers1

0

Bind your List to DataGrid ItemsSource:

<DataGrid ItemsSource="{Binding YourList}" />

DataGrid will load objects from your collection. You can modify the columns using DataGridTemplateColumn.

View an example here: WPF DataGrid Control

BotBot
  • 26
  • 1
  • 4
  • Yes, it's right. This question can be useful for prevention errors http://stackoverflow.com/questions/683863/items-collection-must-be-empty-before-using-itemssource. – M Hrytsenia May 18 '14 at 17:21