Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
Format lost in export to excel - rows in the body
posted

I posted queries over a month ago and received good help about the format being lost in the summary row when I export a WebDataGrid to excel.  I had included the question about the main data rows (the "body" of the grid) which are also not formatted according to the stylesheet being applied to those rows when exported.  I never got a reply about this main data row issue and have not been able to determine a workaround.

As it is currently, my header and summary rows have the proper color, font, font-size, horizontal alignment etc format because I used the workarounds.  The main rows, however, do not retain the stylesheet settings and this is not satisfactory for my users.  Please tell me there is a workaround or some kind of fix that will retain the styles from the stylesheet for the main data rows of the grid.

 

Here is what is in the stylesheet that is reflected on the web page when the grid renders but is not being retained in the export:

     
    tbody tr.RowDetail td
    {
        background-color:white;     
    }
   
    tbody tr.RowDetailAlt td
    {
        background-color:#C2C2A0;       
    }
  
    tbody > tr > td.Left
    {
        text-align:left;
        border-color:Gray;       
        border-style:ridge;
        border-width:1px;
        border-left-color:White;
        border-left-width:0px;
        border-top-color:White;
        border-top-width:0px;     
        white-space:nowrap;
        font-family:Verdana;
        font-size:8pt;      
    }
    tbody > tr > td.Right
    {
        text-align:right;
        border-color:Gray;       
        border-style:ridge;
        border-width:1px;
        border-left-color:White;
        border-left-width:0px;
        border-top-color:White;
        border-top-width:0px;
        white-space:nowrap;
        font-family:Verdana;
        font-size:8pt;      
    }
   
    tbody > tr > td.Center
    {
        text-align:center;
        border-color:Gray;
        border-style:ridge;
        border-width:1px;
        border-left-color:White;
        border-left-width:0px;
        border-top-color:White;
        border-top-width:0px;
        white-space:nowrap;
        font-family:Verdana;
        font-size:8pt;     
    }

Thanks  so much.

 

Kurt