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
I am getting an error when exporting a web grid to XML. The error message is "Cannot change the name of the DataSet to an empty string."
I tried setting the data source as datatable and dataset. Both give same error. Pls help!
Code Snippet below..
Web Grid Definition -
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" AllowAutoDataCaching="True" Visible="false" DataMember="CarrierList" Height="430px" UseDefaultStyle="True" Width="100%" OnExport="WebGrid1_Export" OnExportCompleted="WebGrid1_ExportCompleted" OnPrepareExportExecute="WebGrid1_PrepareExportExecute" OnInitializePostBack="WebGrid1_InitializePostBack" OnInitializeRow="WebGrid1_InitializeRow" OnInitializeDataSource="WebGrid1_InitializeDataSource" > <RootTable DataKeyField="Oid" GroupMode="Collapsed" DataMember="CarrierList" Caption="CarrierList"> <Columns> ... ... </Columns> </RootTable> <LayoutSettings AllowColumnMove="Yes" AllowExport="Yes" AllowGrouping="No" AllowSelectColumns="Yes" AllowFilter="Yes" AllowSorting="Yes" ApplyFiltersKey="Enter" AutoFilterSuggestion="true" PagingMode="VirtualLoad" RowChangedAction="none" AlwaysShowHelpButton="False" RowHighlightType="EntireRow" InProgressUIBehavior="ChangeCursorToHourGlass" ShowFilterStatus="True" CellClickAction="rowSelect" FilterBarVisible="False"> <FreezePaneSettings ShowInContextMenu="True" MaxFrozenColumns="2" /> <GroupByBox ContextMenu="false"> </GroupByBox> <ClientSideEvents OnRowContextMenu="WebGrid1_OnRowContextMenu"/> </LayoutSettings> </ISWebGrid:WebGrid>
Data Source -
try { DataSet ds = new DataSet("CarrierList"); ds.Tables.Add(_dt); e.DataSource = ds; }
I created a simple sample of WebGrid where the datasource is DataTable; and was able to export WebGrid's data to XML without any problems. Please find my sample in the attachment; test it on your end; and let me know if you have different result.
For your information, I'm using the latest version of WebGrid 8 in my local end.
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