This is a migrated thread and some comments may be shown as answers.

Rating column doesn't export to CSV/Excel

1 Answer 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
regis
Top achievements
Rank 1
regis asked on 05 Aug 2011, 09:44 PM
Hi everyone,

We are using a grid column and it's displayed correctly in the grid.
We have implemented an export function (using RadGrid1.MasterTableView.ExportToCSV();).
The resulting file is a CSV or excel without any value under the rating column.

Are there any known issue with the export of a rating column?

Thank you

Regis

1 Answer, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 06 Aug 2011, 06:00 AM
Hello Regis,

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {
  
        if (e.CommandName == RadGrid.ExportToCsvCommandName)
        {
            foreach(GridDataItem item in RadGrid1.Items)
            {
                    TableCell cell = item["rating"];
                    RadRating radrate = cell.Controls[0] as RadRating;
                    cell.Text = radrate.Value.ToString();
  
            }
        }
    }

for more info.
http://www.telerik.com/help/aspnet-ajax/grid-csv-export.html


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
regis
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or