3
How do I fill one DataGrid
from a List
typical?
It would be possible to generate the columns automatically?
3
How do I fill one DataGrid
from a List
typical?
It would be possible to generate the columns automatically?
3
Yes ItemSource
of DataGrid
(vi that your case is WPF) you can pass any enumeration (Ilist, Icollection, etc)
DataGrid1.ItemsSource = (new List<T>());
Where new List<T>()
is your list.
To enable automatic column creation, place True in AutoGenerateColumns
in his DataGrid
of WPF
.
Thanks man, it helped a lot. I did as I said and when I ran, nothing... I realized that there were three lines in Datagrid, but there was no column. I looked for some property or method that generated, found the Autogeneratecolumns and left as true and worked! Thanks :)
Okay, I’m glad it worked out
Browser other questions tagged c# wpf
You are not signed in. Login or sign up in order to post.
To supplement your question, edit your question, not the answer given. To add an answer, give your own answer.
– Maniero
Caique, to complement the reply, leave a comment. The author decides whether or not to include the content you suggest.
– bfavaretto
Ah, okay. Sorry.
– Caique C.