export all columns of a radgrid

3 posts, 0 answers
  1. Gilberto
    Gilberto avatar
    65 posts
    Member since:
    Sep 2006

    Posted 10 Sep 2012 Link to this post

    Hello

    Can i use the exporting built in radgrid to export all columns even if the collumn is display = false?

    best regards

    gilberto
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 10 Sep 2012 Link to this post

    Hello,

    protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
            {
                if (e.CommandName == Telerik.Web.UI.RadGrid.ExportToExcelCommandName ||
                    e.CommandName == Telerik.Web.UI.RadGrid.ExportToWordCommandName ||
                    e.CommandName == Telerik.Web.UI.RadGrid.ExportToCsvCommandName)
                {
                    ConfigureExport();
                }
            }
          
            public void ConfigureExport()
            {
                                    radGrid1.MasterTableView.Columns.FindByUniqueName("YOURCOLUMNUNIQUENAME").Display = true;
     
            }


    Thanks,
    Jayesh Goyani
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Gilberto
    Gilberto avatar
    65 posts
    Member since:
    Sep 2006

    Posted 11 Sep 2012 Link to this post

    Thanks, it works
Back to Top