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

RadGrid using Webservice binding but not export data...

4 Answers 107 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
nanthakumar thangavel
Top achievements
Rank 1
nanthakumar thangavel asked on 09 Jul 2010, 12:18 PM
RadGrid using Webservice binding but not export data.(Xls,csv)

4 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 09 Jul 2010, 03:24 PM
Hello Nanthakumar,

Please make sure that you consume the webservice on the server and not on the client.

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
nanthakumar thangavel
Top achievements
Rank 1
answered on 10 Jul 2010, 06:44 AM
Hi

I implemented  Grid / Client-side Binding and Caching  concept  because performance Issue for other Databinding Concept.But Exporting not Working 
or any other method  to implement Caching ,Performance with Export Data?

This is my code
<telerik:RadGrid ID="RadGrid2" AllowSorting="true" AllowPaging="true" AllowFilteringByColumn="true"
            AutoGenerateColumns="false" runat="server">
            <MasterTableView CommandItemDisplay="Top">
                <CommandItemSettings ShowExportToCsvButton="True"
                    ShowExportToExcelButton="True" />
                <Columns>
                    <telerik:GridBoundColumn DataField="Id" HeaderText="Id" />
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Name" />
                      
                </Columns>
  
<PagerStyle AlwaysVisible="True"></PagerStyle>
            </MasterTableView>
            <PagerStyle AlwaysVisible="true" />
            <ClientSettings>
                <DataBinding Location="~/mywebservice.asmx"  EnableCaching="true"
                    SelectMethod="GetFacilityListCH"  />
            </ClientSettings>
        </telerik:RadGrid>
0
Daniel
Telerik team
answered on 15 Jul 2010, 09:42 AM
Hello Nanthakumar,

You have to bind RadGrid on the server only when exporting. Try this approach:
<asp:Button ID="Button1" runat="server" Text="Export" OnClick="Button1_Click" />
<telerik:RadGrid  ID="RadGrid2" AllowSorting="true"  AllowPaging="true" 
     ...
     <ClientSettings>
         <DataBinding Location="~/mywebservice.asmx"  EnableCaching="true"
             SelectMethod="GetFacilityListCH"  />
     </ClientSettings>
</telerik:RadGrid>

protected void Button1_Click(object sender, EventArgs e)
{
    RadGrid1.DataSource = MyWebService.GetData();
    RadGrid1.Rebind();
    RadGrid1.MasterTableView.ExportToCSV();
}

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
nanthakumar thangavel
Top achievements
Rank 1
answered on 16 Jul 2010, 11:10 AM
Thank you very nice...This very useful for me...
Tags
General Discussions
Asked by
nanthakumar thangavel
Top achievements
Rank 1
Answers by
Daniel
Telerik team
nanthakumar thangavel
Top achievements
Rank 1
Share this question
or