Export RadGrid

5 posts, 0 answers
  1. Karl
    Karl avatar
    172 posts
    Member since:
    Jun 2009

    Posted 24 Nov 2011 Link to this post

    Hi,

    I have a radgrid with a template column which contains a XHTML table. I'm trying to display the border when it has been exported and it never shows. I've tried style attributes and border and they don't work.

    Can any one help.

    Thanks
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 24 Nov 2011 Link to this post

    Hello Karl,

    Try the following code.
    C#:
    protected void RadGrid1_ExcelExportCellFormatting(object sender, ExcelExportCellFormattingEventArgs e)
     {
        GridDataItem item = e.Cell.Parent as GridDataItem;
        if (e.FormattedColumn.UniqueName == "TemplateColumnUniqueName")
        {
        e.Cell.Style[" border-color"] = "Red";
        }
    }

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Karl
    Karl avatar
    172 posts
    Member since:
    Jun 2009

    Posted 24 Nov 2011 Link to this post

    Hi,

    Sorry,  I need this in a PDF not excel.

    Thanks
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 24 Nov 2011 Link to this post

    Hello Karl,

    When you are exporting HTML tables to pdf, the table should define <colgroup> and <col> elements. Check the following help documentation which explains more about this.
    PDF export

    -Shinu.
  6. Jo Bert
    Jo Bert avatar
    41 posts
    Member since:
    Aug 2008

    Posted 19 Dec 2011 Link to this post

    Hi,

    Just want to know if its possible to export multiple radgrid which loads data on page load into one pdf/word file? I saw a solution here in the forums. I tested it and it is working fine, but the problem is the radgrids doesn't have any formatting. Is it possible to have the 3 rad grid with borders in the pdf?

    Thanks a lot.
    Jo
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017