We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to hide particular row when printing.

Thread ID:





59493 Apr 14,2007 12:46 PM UTC Apr 16,2007 05:16 PM UTC WinForms 1
Tags: GridControl
Asked On April 14, 2007 12:46 PM UTC


I have grid, when i am preparing the GridPrintDocument(i.e when i click Print, PrintPreview, PageSetup button) i am adding a new row to the grid.And this row is deleted when the task is completed.

Problem is when i click pagesetup button the row is created and is visible.It should be visible only when i see print preview or when i take a print.


haneefm [Syncfusion]
Replied On April 16, 2007 05:16 PM UTC

Hi Raghav,

How to hide particular row when the grid is in printing?

One way you can hanlde the QueryRowHeight event and set the e.Size to "0" when the grid is in PrintingMode. Here is a code snippet that shows you "How to hide particular row when the grid is in printing?"

this.gridControl1.QueryRowHeight +=new GridRowColSizeEventHandler(gridControl1_QueryRowHeight);

private void gridControl1_QueryRowHeight(object sender, GridRowColSizeEventArgs e)
if( this.gridControl1.PrintingMode && e.Index == 4 )
e.Size = 0;
e.Handled = true;

Best regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon