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.
Unfortunately, activation email could not send to your email. Please try again.

How to hide particular row when printing.

Thread ID:

Created:

Updated:

Platform:

Replies:

59493 Apr 14,2007 08:46 AM Apr 16,2007 01:16 PM Windows Forms 1
loading
Tags: GridControl
Raghav
Asked On April 14, 2007 08:46 AM

Hi,

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.

Thankyou
Raghavendra.

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

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,
Haneef

CONFIRMATION

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.

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.

;