WPF DataGrid

WPF DataGrid facilitates developer heavily more than Listview to display data.In this post i will discuss some basic functionality of DataGrid.

Column:You can define your DataGrid columns manually by setting the AutoGenerateColumns property to False. You have the following types of columns available:

* DataGridCheckBoxColumn for boolean values
* DataGridComboBoxColumn for enumerable values
* DataGridHyperlinkColumn for Uri values
* DataGridTemplateColumn to show any types of data by defining your own cell template
* DataGridTextColumn to show text values
You can customize the DataGridTemplateColumn by your own style such as Image,Textbox,Button,checkbox,Combobox etc.
Alternative Row Background:
To set alternative row Background define DataGrid Property by


The ItemsSource property is used for display collection of data.
If you have any query about this topic please leave a comment.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: