Hi everyone, i need some ideas. Currently I implement print screen into my project. So print button will print all the content in my page. I set up all the content in one panel which is 'mainPanel'. In my 'mainPanel' there have gridview. How can I hide this gridview when I print screen the page? Here I attach the image for the page.
Thank you.
4 Answers, 1 is accepted
According to the provided information, it is not clear what is the exact printing implementation that you have on your end. Hence, it wouldn't be easy to suggest an appropriate solution.
Usually, in order to hide a certain control, you just need to set its Visible property to false. Thus, the control will remain present on the form, but it will be invisible to the end users.
I would recommend you to have a look at the following help article which demonstrates a sample approach how to create printable panel: https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/printing-support/how-to/create-prinatble-panel
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Thank you Dess for replying.
Im using radprintdocument. Here is the snap code for print function and the printing result. I want to hide the gridview when print the whole content in the page. Curently in my user control, I have one mainpanel which include the gridview. As you can see in the code, I print the whole content in my main panel. So its include my grid view. How to hide this grid view ? I just want user view the grid view when load the page. I do not want to print this gridview.
I would kindly ask you to use the "Format Code Block" option in the editor when you want to insert some code snippet. Thus, we would be able to test on our end any code that you provide.
As it was previously explained, you just need to set the Visible property to false for RadGridView before printing and make it back visible when the printing is done.
An alternative solution is to arrange the controls in your UserControl in a different way. Thus, you can put all controls that you want to print in a separate RadPanel. Thus, you can make only this RadPanel a PrintablePanel. As a result, the RadGridView will not be contained in this panel and it won't be printed as well.
Should you have further questions please let me know.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.