Hi there,
In my project I want to export a grid, and in documentation this looks like very simple task, but it doesn't work in my case and the error doesn't mean anything.
// This is my DocumentExporter and my Grid
<igtbldocexp:UltraWebGridDocumentExporter ID="UltraWebGridDocumentExporter1" runat="server" DataExportMode="DataInGridOnly" TargetPaperSize="A4" /><igtbl:UltraWebGrid ID="GridDocumentLibrary" SkinID="uwgStandart" runat="server" Width="100%" OnPreRender="GridDocumentLibrary_OnPreRender"><Bands> <igtbl:UltraGridBand> <Columns> <igtbl:TemplatedColumn BaseColumnName="CheckB" Key="CheckB" Type="CheckBox" DataType="System.Boolean" AllowUpdate="Yes" Width="5%"> <HeaderTemplate> <input id="chboxDocLibraryHeaderCheck" type="checkbox" onclick="COMMON_checkHeader_OnClick_CheckB('<%= GridDocumentLibrary.ClientID %>',this)" /> </HeaderTemplate> </igtbl:TemplatedColumn> <igtbl:UltraGridColumn AllowUpdate="No" BaseColumnName="Regarding" GatherFilterData="False" Key="Regarding" Width="30%"> <Header Caption="HeaderRegarding" /> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn AllowUpdate="No" BaseColumnName="FileName" GatherFilterData="False" HeaderClickAction="Select" Key="FileName" Width="28%"> <Header Caption="HeaderFileName" /> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn AllowUpdate="No" BaseColumnName="FileUrl" GatherFilterData="False" HeaderClickAction="Select" Key="FileUrl" Hidden="True" /> <igtbl:UltraGridColumn AllowUpdate="No" BaseColumnName="RegardingTypeKey" GatherFilterData="False" HeaderClickAction="Select" Key="RegardingTypeKey" Hidden="True" /> <igtbl:UltraGridColumn AllowUpdate="No" BaseColumnName="EntityType" GatherFilterData="False" HeaderClickAction="Select" Key="EntityType" Hidden="True" /> <igtbl:TemplatedColumn Key="Chat" Width="5%" BaseColumnName="Chat" HeaderClickAction="Select" > <CellTemplate> <asp:Image ID="imgChat" runat="server" ImageUrl="~/Image/ico_16_9.gif" Visible='<%# Utils.CheckOnlineUsers(Utils.StringToGuid(Container.Cell.Text)) %>' /> </CellTemplate> </igtbl:TemplatedColumn> </Columns> </igtbl:UltraGridBand> </Bands></igtbl:UltraWebGrid>
// This is my C# code, that I found in the help
UltraWebGridDocumentExporter1.ExportMode = Infragistics.WebUI.UltraWebGrid.Exporter.ExportMode.Custom;UltraWebGridDocumentExporter1.Format = Infragistics.Documents.Report.FileFormat.PlainText;string s = @"d:\WebGrid2.txt";FileStream fileStream = File.OpenWrite(s);UltraWebGridDocumentExporter1.Export(GridDocumentLibrary, fileStream, true);
I don't know where is the problem, is it my TemplatedColumns (I check that, they won't be exported according the documentation, and that will be OK with me, if the exportation works).
I need to export at excell, pdf and plain text. Can anybody help me?
Regards, Iva
I want to add that I have ScriptManager on the page and the UltraWebGrid is in UpdatePanel and the UpdatePanel is in UserControl,
Is this is a problem
There would be a problem if you try to add the excelexporter inside the updatepanel...
because they dont work together
Hey even i have same requirement, are you able to solve problem.