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

 

 

comments
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
HTML 5 + JQUERY CONTROLS
SPONSORED BY
Nevron Chart