Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.
Fri Apr 27, 2012 7:11 am
Dear Support,
I am using pdf table, i need to coloring the cells based on some values in datatable but i do not want to show that value in report. Let me know.
also i have attached the screen shot for expected result.
According to your description, you want to hide the colored cells in PDF table. Is it right? If so, I am sorry to tell you that Spire.Pdf can not support to hide cells in PDF table. If not, could you please send us your report to help us to resolve this problem?
Thanks for your quick response. Let me clarify my question again. I think you didnt understand what I am asking.
My input parameter for pdftable is a datatable. Actually I need to hide 1 column when the pdf rendering is happened. This is because I have some calculation based on that column so it is not possible to avoid that column from SQL query before assign the datatable to PdfTable object. According to that column value I want to set different colours for pdf table columns. So I just want to know that is there a way to skip/hide a particular column before rendeing the actual PDF.
There is no method to hide/skip a column in the pdfTable itself. You can only remove a column in the dataSource of the pdfTable. In your case, you can use a temp dataTable as the dataSource of the pdfTable. You calculate the calculation based on the dataTable and then remove the column you want to skip, at the last, you use the temp dataTable as the dataSource of your pdfTable. Please have a kind try.