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

exporting the grid to ms word

4 Answers 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anjali
Top achievements
Rank 1
Anjali asked on 09 Jul 2011, 07:57 PM
I posted this question before, but somehow I cannot find my post. I am exporting the grid to ms word. On each page of my Ms word dosumnet , I want the header to say "This is a Draft data".

How can I do this.

Thanks.

4 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 11 Jul 2011, 05:28 AM
Hello Anjali,

Try the following code snippet to set header for exported word.

C#:
protected void RadGrid1_PdfExporting(object sender, GridPdfExportingArgs e)
{
    e.RawHTML = "<div this is draft data</div>" + e.RawHTML;
}

Thanks,
Shinu.
0
Anjali
Top achievements
Rank 1
answered on 11 Jul 2011, 10:07 PM
Thanks Shinu!!
0
GTL Dev
Top achievements
Rank 2
answered on 26 Sep 2011, 04:10 PM
Did I miss something here, he asked about exporting grid to ms word and you gave him a snippet for the PDFexporting event.

Is that snippet correct, you put code in the PDFexporting to get output in a word document?
0
Bruno
Top achievements
Rank 2
answered on 26 Sep 2011, 08:56 PM
I doubt you are missing something as this thread is a pure mystery to me also. I read it over and over again but I still feel totally stumped.
Seems that there is some form of communication occurring on a sub-dimensional level here.
Just kidding of course, but still this is hell of a weird thread.
I'd try the same thing, but on the GridExporting event (instead of PdfExporting). Sorry don't remember the exact syntax but you could search around for an example.
Tags
Grid
Asked by
Anjali
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Anjali
Top achievements
Rank 1
GTL Dev
Top achievements
Rank 2
Bruno
Top achievements
Rank 2
Share this question
or