DataGrid Control In WPF

By Mahak Gupta 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

 

 

Mahak Gupta

My name is Mahak Gupta. I am a C# Corner MVP.

COMMENT USING

PREMIUM SPONSORS

Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.

Latest Blogs