Tuesday, December 14, 2010

DataGrid/ListBox Paging in Silverlight 4

Xaml Code:-
open tag data:datapager name="Datapager1" pagesize="10" displaymode="FirstLastPreviousNext" autoellipsis="True" horizontalalignment="Left" numericbuttoncount="3" istotalitemcountfixed="True/">



Code Behind:


using System.Window.Data;
PagedCollectionView pagedcollectionview = new PagedCollectionView(“Collection”));
Datapager1.Source= pagedcollectionview;
myDatagrid.ItemsSource = pagedcollectionview;

No comments:

Post a Comment