DataGrid Paging in Silverlight

DataGrid Paging in Silverlight

Here im going to give you a basic code for Silverlight Datagrid Paging.You can apply in your program and check the difference. 

xaml Code:

<sdk:DataGrid x:Name="myDatagrid"/>
        <sdk:DataPager x:Name="myPager" Source="{Binding Path=ItemsSource, ElementName=myDatagrid}" PageSize="3" DisplayMode="FirstLastPreviousNextNumeric" />

In display mode you can choose other options also based upon your needs. 

C# Code:

  public MainPage()
   {
     InitializeComponent();

    PagedCollectionView pagedcollectionview = new PagedCollectionView("I T E M S O U R C E".Split(' '));

    myDatagrid.ItemsSource = pagedcollectionview;
    }

Comments

Popular posts from this blog

Upload Single/Multiple file by using the REST API and jQuery SharePoint 2013

Add content type to SharePoint List/Library using REST API

A type named 'SP.Data. could not be resolved by the model error