cómo obtener el valor de la celda de la vista de cuadrícula mientras se exporta la vista de cuadrícula a pdf usando iTextSharp

Currently I try to export an gridview (include an image each row) to PDF file. I find out that PdfPTable table = new PdfPTable(TotalColumns) can help me modify and insert the image to the column. like "table.AddCell(image);"

but how do i insert the gridview (each row)'s each cell's value in to that? (without using findcontrol)

muchas gracias.

preguntado el 08 de noviembre de 11 a las 09:11

1 Respuestas

it's asp.net webforms, right? here is the sample about converting a gridview to pdf using iTextSharp: [^]

respondido 08 nov., 11:21

Thanks VahidN, ya, it is asp.net platform. I still looking at the coding. quite hard to me because i still fresh with this. Anyway, thanks for your help. - 456qwe123asd

Hi, VahidN. it is exportable pdf file. but i got some problems. It is export the html code but not the context like it will export <span id=id >texting</span> but not "texting" in the cells. and the 1s column will go to last and last column will display in the 1st column. do u know how solve it? thanks a lot. - 456qwe123asd

iTextSharps' html to pdf support is very limited and it has not a sophisticated html parser like browsers. so don't expect that everything should work + you need to change run direction in that file from rtl to ltr. now it should work for you from left to right. - VahidN

ok....i already switch the direction back.but it is just a html code. how can i do for display it as a 'real thing'? - 456qwe123asd

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.