using DevExpress.Export;
using DevExpress.Web;
using DevExpress.XtraPrinting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OlympiaIntranet
{
    public partial class RankingBreveTermineFondiETF : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // Setta in tutte le colonne di default ricerca per 'Contains' invece che per 'Begins with' (mettere in Page_Load altrimenti non funziona!)
            CommonClass.SetColumnFilterContains(gvRankingBreveFondiETF);
        }

        protected void ASPxExportXls_Click(object sender, EventArgs e)
        {
            ASPxGridViewExporter1.ExportSelectedRowsOnly = false;
            ASPxGridViewExporter1.FileName = DateTime.Now.ToString("yyyyMMdd_HHmm") + " - Ranking Breve Termine Fondi/ETF";
            XlsxExportOptionsEx op = new XlsxExportOptionsEx() { ExportType = ExportType.DataAware }; // in DataAware mode l'evento ASPxGridViewExporter_RenderBrick non viene eseguito!!
            ASPxGridViewExporter1.WriteXlsxToResponse(op);
        }

    }
}