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

Export to Excel updates but no save as..

4 Answers 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 18 Aug 2010, 06:23 PM
I am setting up a radgrid to export the grid to excel via a button click. It is processing the request. Hiding the columns I don't want to be exported and updating the grid with a new view. It does not have a give me the option to save a file.

  <telerik:RadGrid ID="DisplayDataGrid" runat="server" AutoGenerateColumns="False"
        AllowSorting="True" AllowPaging="True" PageSize="6" OnNeedDataSource="Grid_NeedDataSource"
        OnItemCreated="Grid_ItemCreated" Width="100%" GridLines="None" Skin="Hay" ShowStatusBar="true"
        ItemStyle-Font-Size="7pt" AlternatingItemStyle-Font-Size="7pt">
        <ClientSettings EnableRowHoverStyle="true">
            <Scrolling AllowScroll="True" ScrollHeight="230px" UseStaticHeaders="True" />
        </ClientSettings>
        <ExportSettings IgnorePaging="true" OpenInNewWindow="true" FileName="SeismicPetroWeb2D"
            ExportOnlyData="true" Excel-Format="ExcelML" Excel-FileExtension="xls"  />
   <MasterTableView>
                            <Columns>
 <telerik:GridHyperLinkColumn DataTextField="SURVEY" HeaderText="Survey" SortExpression="SURVEY"
                                    UniqueName="SURVEY">
                                    <HeaderStyle Width="85px" />
                                    <ItemStyle Font-Underline="False" ForeColor="Black" Wrap="False" Width="85px" />
                                </telerik:GridHyperLinkColumn>
...
...
    </telerik:GridHyperLinkColumn>
                            </Columns>
                            <PagerStyle AlwaysVisible="True" />
                        </MasterTableView>
    </telerik:RadGrid>


and the button click event:
 Protected Sub ButtonExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonExcel.Click
        DisplayDataGrid.MasterTableView.Columns(0).Visible = False
        DisplayDataGrid.MasterTableView.Columns(1).Visible = False
     
        DisplayDataGrid.MasterTableView.ExportToExcel()
    End Sub

Thoughts?

Thanks!

4 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 24 Aug 2010, 09:15 AM
Hello William,

Can you please provide some more information? Do you clear the Reponse headers? Do you see a file dialog popup after you press the export button? If this is so, can you attach a screenshot?

I would also appreciate it if you post some code so that I can examine your approach.

Regards,
Daniel
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
William
Top achievements
Rank 1
answered on 29 Aug 2010, 09:27 PM
Thanks for the response....


Clear response headers? No file dialog box. It thanks for a few seconds and they reloads the radgrid. It is different format styles and fairly plain.

I posted some code previously, what else would you like to see. It is a massive site with this control used heavily.

Thanks,
RB Bruce
0
Daniel
Telerik team
answered on 31 Aug 2010, 09:40 PM
Hello William,

Judging by the provided information, I suppose that the control that initiates the export is ajaxified. If this is so, please take a look at the link below:
Export from ajaxified grid

Regards,
Daniel
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
William
Top achievements
Rank 1
answered on 04 Oct 2010, 07:05 PM
That issue is fixed. Thanks for your help.
Tags
Grid
Asked by
William
Top achievements
Rank 1
Answers by
Daniel
Telerik team
William
Top achievements
Rank 1
Share this question
or