Paging image Icon of details table is exporting in Excel

3 posts, 0 answers
  1. Shubham
    Shubham avatar
    32 posts
    Member since:
    May 2013

    Posted 11 Feb 2014 Link to this post

    Hi All,
             I have two detail Tables in my RadGrid . when I am exporting it in excel the bad image of paging icons are also getting exported in excel.
            these bad images are exporting only for those child grids which have data in it.  please let me know what I am doing wrong.  my code behind code is

    I have also attached the excel sheet which having these bad images Please find them


      private void ExportDataToFile()
        {
            RadGrid.MasterTableView.ExpandCollapseColumn.Display = false;
            RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.Client;
            RadGrid1.MasterTableView.DetailTables[0].ExpandCollapseColumn.Display = false;
            RadGrid1.MasterTableView.DetailTables[0].DetailTables[0].ExpandCollapseColumn.Display = false;
            RadGrid1.MasterTableView.DetailTables[0].DetailTables[0].ShowFooter  = false;
            RadGrid1.MasterTableView.DetailTables[0].DetailTables[0].ShowGroupFooter= false;
            RadGrid1.MasterTableView.DetailTables[0].DetailTables[0].PagerStyle.Visible  = false;
            RadGrid1.ExportSettings.IgnorePaging = true;
            RadGrid1.MasterTableView.DetailTables[0].DetailTables[0].AllowPaging = false;
            //RadGrid1.MasterTableView.DetailTables[0].DetailTables[0].PagingManager. = false;
         
        }

    protected void ExportToExcelImageButton_Click(object sender, EventArgs e)
        {
            ExportDataToFile();
            ExportToExcel(RadGrid1, "GridResults");
        }

    RadGrid searchRadGrid, String fileName,)
            {
                if (isActionColumn)
                    searchRadGrid.MasterTableView.Columns.FindByUniqueName(columnUniqueName).Display = false;
                searchRadGrid.MasterTableView.HierarchyDefaultExpanded = true;
                searchRadGrid.MasterTableView.DetailTables[0].DetailTables[0].AllowPaging =  false;
                searchRadGrid.MasterTableView.DetailTables[0].DetailTables[0].AllowCustomPaging  = false;
                if (searchRadGrid.MasterTableView.HasDetailTables)
                {
                    foreach (GridTableView gridTableView in searchRadGrid.MasterTableView.DetailTables)
                    {
                        // Added by partner CB to Fix defect 15597 
                        gridTableView.AllowPaging = false;
                        gridTableView.HierarchyDefaultExpanded = true;
                        gridTableView.AllowPaging = false;
                    }
                }
                searchRadGrid.ExcelExportCellFormatting += new OnExcelExportCellFormattingEventHandler(SearchRadGrid_ExcelExportCellFormatting);
                searchRadGrid.ItemCreated += new GridItemEventHandler(RadGrid_ItemCreated);
                searchRadGrid.ExportSettings.ExportOnlyData = true;
                searchRadGrid.ExportSettings.IgnorePaging = true;
                searchRadGrid.ExportSettings.OpenInNewWindow = true;
                searchRadGrid.ExportSettings.FileName = fileName;
                _isExport = true;
                searchRadGrid.MasterTableView.ExportToExcel();
            }
    Thanks







  2. Shubham
    Shubham avatar
    32 posts
    Member since:
    May 2013

    Posted 11 Feb 2014 in reply to Shubham Link to this post

    Please find the image of exported excel releted to  the above issue
  3. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 11 Feb 2014 in reply to Shubham Link to this post

    Hi Shubham,

    Its not an expected behavior, please have a look into the following code library on Export Hierarchical Grid . Please try and check if the issue exists.

    Thanks,
    Shinu

Back to Top