iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
I use WebGrid7 and ISDataSource.
<ISWebGrid:WebGrid ID="GridHandle" runat="server" Width="99%" DefaultStyleMode="Win7" UseDefaultStyle="True" DataSourceID="ISDataSource1" DataMember="DB_Messages_Center" OnPrepareExportExecute="WebGrid1_PrepareExportExecute" Height="200px" OnInitializeRow="WebGrid1_InitializeRow" OnExport="WebGrid1_Export"> <LayoutSettings PagingMode="ClassicPaging" PagingLoadMode="Custom" PagingSize="50" AllowFilter="Yes" PagingStyleUI="FirstPrevNextLast" AllowExport="Yes" PagingExportMode="ExportAllData"> <ClientSideEvents OnInitialize="ISWebGrid_OnInitialize_Common" /> </LayoutSettings> <RootTable DataKeyField="MessageItemGuid"> <Columns> </Columns> </RootTable> </ISWebGrid:WebGrid> <ISDataSource:ISDataSource ID="ISDataSource1" runat="server" SchemaType="CustomObject"> <Tables> <ISDataSource:ISDataSourceTable SelectMethod="WaitHandle_PageView_BanLi" EnablePaging="true" SelectCountMethod="WaitHandle_Count_BanLi" TableName="DB_Messages_Center" TypeName="Epoint.Messages.Bizlogic.DB_Messages_Center"> <SelectParameters> <asp:ControlParameter ControlID="DateFromTo1" Name="DateFromTo" PropertyName="FromValue" Type="String" /> <asp:ControlParameter ControlID="DateFromTo1" Name="DateTo" PropertyName="ToValue" Type="String" /> <asp:ControlParameter ControlID="txtTitle" Name="txtTitle" PropertyName="Text" Type="String" /> <asp:ControlParameter ControlID="txtArchiveNo" Name="ArchiveNo" PropertyName="Text" Type="String" /> <asp:Parameter Name="TableName" DefaultValue="Messages_Center_Histroy" Type="String" /> <asp:Parameter Name="IsDel" DefaultValue="0" Type="Int32" /> </SelectParameters> </ISDataSource:ISDataSourceTable> </Tables> </ISDataSource:ISDataSource>
When I export WebGrid, It only can export the current page, How to export all records?
Thanks!
Hi Xu Guochun,
To export all records in WebGrid, just simply set the property PagingExportMode="ExportAllData". I've tried to make a sample based on your sample, but I couldn't replicate your issue. Could you give me a simple runable sample so that I could check it on my end?
Regards,
Lili Khiung
Custom paging is also known as load on demand technique. Custom paging can be implemented using ObjectDataSource or ISDataSource. In general, custom paging implementation requires three important steps:
The heart of the custom paging is to provide custom logic for retrieving rows according to the current view of the WebGrid. This done via custom codes in the Select method. For more detail information, please check on this page.
By default, the classic paging will use automatic data retrieval mode. In automatic mode, WebGrid determines the total datasource rows based on the given datasource and display the current page appropriately. When uses automatic data retrieval, by setting the value of “PagingExportMode” property to “ExportAllData” will cause WebGrid to export all data (not current page only).
When uses custom paging, it is the datasource control that determines the amount of rows that will be given to WebGrid, thus when exporting on the first load will only export first page.
Hope this help.
*Please try to move the last page after the grid loaded; and then try to export the rows. It will export all data, since the datasource control has provides entire rows to WebGrid.
I set the property like this, but the issue is still exist.
<LayoutSettings PagingMode="ClassicPaging" PagingLoadMode="Custom" PagingSize="20" PagingDataRetrievalMode="ReturnPartialRows" AllowExport="Yes" PagingExportMode="ExportAllData"> </LayoutSettings>
The attchments is Code and Database.
Help me please!
In custom paging scenario, it is the datasource control, in this case is ISDataSource, that determines the amount of rows that will be given to WebGrid. In a simple word, if page 1 is opened, ISDataSource will provide row #1 – row #20; and if last page is opened, ISDataSource will provide all rows.
In order to get a clearer picture, please try to open first page and export the data. Next, open page #2 and export the data. Note that when page #2 is opened, the exported result will show rows from page #1 till page #2. Last, open last page and export the data.
This is the default behavior of the custom paging scenario.
I click the "next page" to goto page #2, then export the data, but the excel file only contain #21-#40, 20 records.
How can I Export all data in this scenaio?
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname