This is a mirror of official site: http://jasper-net.blogspot.com/

DataPager Silverlight Control for Beginners

| Sunday, November 7, 2010
It was a long time when I have post on silverlight data grid control, at that time I was thinking of posting complete series of the post on the data grid control I have posted on the data grid grouping control but I didn't post on the paging of the data grid records. Now after long time I have time to see the silverlight and its paging control, I know there are lot of tutorial regarding data pager control But I have this for the absolute beginner who are just started  their journey of the Silverlight.
For this example I have two controls added in my xaml are one is the data grid control and the second one is the data pager control.
You can see the code for the data grid control and the data pager control in the List 1, Here you can see that I have set the properties of the data grid control like auto generate columns to false mean I will set the columns for the data grid control, IsReadOnly is set to false mean this grid is used for the display of data and the vertical and horizontal grid line brush and GridLinesVisibility is set to All to show both the horizontal and vertical lines.

<sdk:DataGrid Grid.Column="1" Grid.Row="1" AutoGenerateColumns="False"  IsReadOnly="True" GridLinesVisibility="All" HorizontalGridLinesBrush="{StaticResource Brush_BorderOuter}"  VerticalGridLinesBrush="{StaticResource Brush_BorderOuter}" x:Name="dgrdDataGrid" VerticalAlignment="Top" Height="296">
    <sdk:DataGrid.Columns>
         <sdk:DataGridTextColumn Binding="{Binding UserID}" Header="User ID"/>
         <sdk:DataGridTextColumn Binding="{Binding FirstName}" Header="First Name"/>
         <sdk:DataGridTextColumn Binding="{Binding LastName}" Header="Last Name"/>
         <sdk:DataGridTextColumn Binding="{Binding EmailID}" Header="Email"/>
         <sdk:DataGridTextColumn Binding="{Binding ContactNumber}" Header="Contact No."/>


Read more: Asim Sajjad

Posted via email from .NET Info

0 comments: