Quantcast
Viewing all articles
Browse latest Browse all 18858

datagrid, manual render column not work

hi,

I have in MainWindow()  this code:

dgUsers.DataContext = persons;
persons is a list<person>. Person is data container with atribute name,surname,...

In xaml have this code and works super:

<DataGrid Name="dgUsers" ItemsSource="{Binding}"  CanUserAddRows="True"> </DataGrid>

But i need manual render columnt and this code dont work:

<DataGrid Name="dgUsers" ItemsSource="{Binding}"  CanUserAddRows="True" AutoGenerateColumns="False"><DataGridTextColumn Header="Name" Binding="{Binding Path=Name}"></DataGridTextColumn></DataGrid>

Where is mistake? Thanks



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>