This is a migrated thread and some comments may be shown as answers.

Exporting all items in a GridView paged by a DomainDataSource.

3 Answers 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
SEAFC
Top achievements
Rank 1
SEAFC asked on 17 Jun 2010, 05:33 PM
Hi,

How can I export all items of the gridview if this gridview is paged?

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 17 Jun 2010, 06:02 PM
Hi Miguel Luna,

 Simply set the Items property of the GridViewExportOptions object to the collection you feed to the RadDataPager.

Sincerely yours,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
SEAFC
Top achievements
Rank 1
answered on 17 Jun 2010, 06:48 PM

 

 

 

Hi and thanks for your quickly answer...the source of my datapager is feed of a DomainDataSource

I have the next code...
the Grid view...
<
telerik:RadGridView x:Name="grdDevices" 
                     ItemsSource="{Binding PagedSource,ElementName=gridPager}"/>

 

the dataPager control...

 

 

 

 

 

 

<telerik:RadDataPager x:Name="gridPager"
                      Source="{Binding Path=Data,ElementName=devicesDDS}"/>

 

 

 

..and the domainDataSource

 

 

 

 

<riaControls:DomainDataSource Name="productDomainDataSource"

 

 

 

QueryName="GetProductsQuery"
<riaControls:DomainDataSource.DomainContext>
<my:DomainService2 />
</riaControls:DomainDataSource.DomainContext>
</riaControls:DomainDataSource>

 

0
Yavor Georgiev
Telerik team
answered on 18 Jun 2010, 08:35 AM
Hello Miguel Luna,

 In your case, your export call will look something like:

this.grdDevices.Export(myStream, new GridViewExportOptions { Items = this.gridPager.Source as IEnumerable<MyDataObject });

Sincerely yours,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
SEAFC
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
SEAFC
Top achievements
Rank 1
Share this question
or