Last post Dec 28, 2012 03:41 AM by Decker Dong - MSFT
Dec 27, 2012 09:58 AM|wallace740|LINK
I have a situation where my RadGrid has some rows Containing multiple rows
When I export this using RadGrid's export functionality, I see multiple cells used for 1 cell
Dec 27, 2012 10:22 AM|oned_gk|LINK
Dec 27, 2012 10:36 AM|wallace740|LINK
<ExportSettings IgnorePaging="True" HideStructureColumns="true" ExportOnlyData="True">
I use these values with RadGrid and when I export to Excel, it generates a separate cell for each row (which I cant leave like that)
Dec 27, 2012 08:29 PM|Decker Dong - MSFT|LINK
Considering it that this belongs to a 3-rd party control tool of Telerik, I'm afraid Microsoft cannot do much comments on that.
If you'd like to use GridView instead (because that's Microsoft control). I'd like to recommand you this:
Dec 28, 2012 03:24 AM|wallace740|LINK
I use standart GridView to export to excel but the same thing happens.
HTML code is separated into multiple cells :(
protected void ExceleAktarLinkButton_Click(object sender, EventArgs e)
Response.Charset = "";
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
//HTML Codes into Visual HTML
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
if (e.Row.RowType == DataControlRowType.DataRow)
for (int j = 0; j < e.Row.Cells.Count; j++)
string encoded = e.Row.Cells[j].Text;
e.Row.Cells[j].Text = Context.Server.HtmlDecode(encoded);
Screenshot(below) when exported from standart GridView.
1 cell in my GridView is separated into multiple rows :(
Dec 28, 2012 03:41 AM|Decker Dong - MSFT|LINK
To be very honest, it's not an easy task to export a GridView with Html formation.
Maybe you can try to use this tool: