RadGrid Export Not working

3 posts, 0 answers
  1. Victor
    Victor avatar
    27 posts
    Member since:
    Nov 2015

    Posted 05 Oct 2016 Link to this post

    I have an aplication which use a RadGrid, i´m trying to use built-in controls, how ever it is not working.


    CS File

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Telerik.Web.UI;
    using System.Data;
    using SCAPWEB.ods;
    using System.Data;

    namespace SCAPWEB.Views
        public partial class GridStocks : ContentControl
            ScapWebServ.Service1SoapClient consulta = new ScapWebServ.Service1SoapClient();

            protected void Page_Load(object sender, EventArgs e)
                ScriptManager.RegisterStartupScript(Page, typeof(Page), "nudgeIE6", "if ($telerik.isIE6) $telerik.$('.itemDetails, .pageNav, .ordersTitle').each( function() { this.style.cssText = this.style.cssText; });", true);

            protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

                RadGrid grid = (RadGrid)sender;
                grid.DataSource  = consulta.AllExistence("NIS", this.Tipo, this.FechaInicial, this.FechaFinal,this.Flujo).Answer.Select().ToList();

            protected void Page_PreRender(object sender, EventArgs e)
                RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);

                manager.AjaxSettings.AddAjaxSetting(RadGridEstadistica, RadGridEstadistica,LoadingPanel);          




    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GridStocks.ascx.cs" Inherits="SCAPWEB.Views.GridStocks" %>
    <div style="width: 100%; height: 100%; float: left; margin: 10px">

        <telerik:RadGrid ID="RadGridEstadistica" runat="server" Culture="es-ES" Width="100%" Height="500px" AllowSorting="True" UseAllDataFields="True"
            AllowPaging="true" PageSize="18" ClientSettings-Scrolling-AllowScroll="true" OnNeedDataSource="RadGrid1_NeedDataSource" AllowFilteringByColumn="True" FilterType="Combined">

            <MasterTableView CommandItemDisplay="Top" PagerStyle-Mode="NextPrevAndNumeric" TableLayout="Fixed">
                <CommandItemSettings ShowExportToCsvButton="True" ShowExportToExcelButton="True" ShowExportToPdfButton="False" ShowExportToWordButton="False" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
            <ClientSettings AllowDragToGroup="true" EnableRowHoverStyle="true">
                <Selecting AllowRowSelect="true" />
                <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="360px" />
        <telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server">

  2. Victor
    Victor avatar
    27 posts
    Member since:
    Nov 2015

    Posted 05 Oct 2016 in reply to Victor Link to this post

    Sorry i forgot to describe the issue. i want to export to Excel, so i´m trying to use built-in controls and it is not working. I tried many solutions i found in another discussions in this Forum, but till now nothing helped me.
  3. Konstantin Dikov
    Konstantin Dikov avatar
    2466 posts

    Posted 10 Oct 2016 Link to this post

    Hi Victor,

    Please refer to the following help article demonstrating how to use the export functionality of RadGrid with enabled AJAX:
    As you will notice, the export buttons need to perform full postback and not AJAX requests in order for the exporting to work.

    Hope this helps.

    Konstantin Dikov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top