How to Display RowCount on Column Header DataGrid in SilverLight

No.of Views1278
Bookmarked0 times
Downloads 
Votes0
By  usamawahabkhan   On  18 Jan 2011 09:01:23
Tag : Silver Light and XAML , Grid Controls
In this article I will explain how to display RowCount on Column Header in DataGrid in SilverLight. It’s a cool idea to get no of rows in DataGrid and display header in SilverLight.
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

In this article I will explain how to display RowCount on Column Header in DataGrid in SilverLight. It’s a cool idea to get no of rows in DataGrid in SilverLight.

Implementation

As usual create silverlight project and design page as like below, 

Image Loading

and then create a sample class, 

Image Loading

then create sampledata class from sample with list. 

Image Loading

Then  modify the XAML for the page as like below, 

Image Loading

 

Image Loading

and then bind Sample object to gridview with ItemSource 

Image Loading

and then set column is ReOrder and Resize. 

Image Loading

finally modify Header using Template to display row count 

Image Loading

Finally run application and see output as like below, 

Image Loading

That's all.i have attached sample project.you can download and try it.

Download Sample Project

Download source files -2008 kb

 
Sign Up to vote for this article
 
About Author
 
usamawahabkhan
Occupation-Not Provided
Company-Not Provided
Member Type-Senior
Location-Pakistan
Joined date-06 May 2010
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top