[Problem] Is it necessary to add sortdescriptor to the DataGrid when domaindatasource is used in Silverlight to give the value and pagination?

Source: Internet
Author: User

No way. I am a beginner. I really don't know if I use sortdescriptors for sorting, I will report an error when I flip the page? Why? I really don't know. When I add the default sorting, there will be no errors. I don't know where the errors are. Please help me,

I reported an error as soon as I turned the page, but I added the sortdescriptor. It was really big.

Code

 <Grid x:Name="LayoutRoot" Background="White">
<riaControls:DomainDataSource Name="domainDataSource1" QueryName="GetProducts" AutoLoad="True" LoadSize="10" PageSize="5">
<riaControls:DomainDataSource.DomainContext>
<ria:DomainService1/>
</riaControls:DomainDataSource.DomainContext>
<!--<riaControls:DomainDataSource.SortDescriptors>
<riaControls:SortDescriptor PropertyPath="ProductID"></riaControls:SortDescriptor>
</riaControls:DomainDataSource.SortDescriptors>-->
</riaControls:DomainDataSource>

<StackPanel>
<sdk:DataGrid AutoGenerateColumns="True" Name="dataGrid1" ItemsSource="{Binding Data,ElementName=domainDataSource1}">

</sdk:DataGrid>
<sdk:DataPager Name="myDataPager" Source="{Binding Data,ElementName=domainDataSource1}"/>
</StackPanel>
</Grid>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.