Blog

DataGrid Control In WPF

Posted by Mahak Gupta Blogs | WPF Jan 07, 2012
The DataGrid provides provides AutoGenerateColumns Feature, which is used to generate columns according to the requirement of our data Objects.

The DataGrid provides provides AutoGenerateColumns Feature, which is used to generate columns according to the requirement of our data Objects.

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

 

It has the following types of columns:

1)       TextBox columns, which is used to store string values

2)       Hyperlink columns, which is used to store Uri values

3)       ComboBox columns, which is used to store enumerable values

4)       CheckBox columns, which is used to store boolean values

Or we can define it manually, In this case we set the AutoGenerateColumns property to False

1)      DataGridTextColumn to show string values

2)      DataGridHyperlinkColumn for Uri values

3)      DataGridComboBoxColumn for enumerable values

4)      DataGridCheckBoxColumn for boolean values

 

 

COMMENT USING
PREMIUM SPONSORS
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
Employers - Post Free Jobs
SPONSORED BY
  • MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.