Ronnie Overby
Ronnie Overby

Reputation: 46470

DomainDataSource + DomainService

Is it possible to use the DomainDataSource control with a plain DomainService? I want to page/sort non-entity data.

Upvotes: 0

Views: 264

Answers (1)

Rik van den Berg
Rik van den Berg

Reputation: 2839

Yes, if you build your DomainService, it will become available as a DomainContext. then you can use it inside your DomainDataSource.DomainContext property. A simple example from MSDN

<riaControls:DomainDataSource Name="source" AutoLoad="True" QueryName="GetProducts">
    <riaControls:DomainDataSource.DomainContext>
        <domain:ProductDomainContext />
    </riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>

Upvotes: 1

Related Questions