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.

Print all columns are hidden

Thread ID:

Created:

Updated:

Platform:

Replies:

30274 Jun 15,2005 04:30 AM Jun 16,2005 03:47 AM Windows Forms 3
loading
Tags: GridControl
Hoang Dinh
Asked On June 15, 2005 04:30 AM

I am using GridDataBoundGrid to display data and I need hide some columns to user. But when I print this datagrid, all hidden columns are lost. I would like to print all columns in the grid whether It is hidden or not. Please let to me know how to print all columns if have some column are hidden. Thanks, Hoang

Administrator [Syncfusion]
Replied On June 15, 2005 05:13 AM

If you hide the columns by setting their widths=0, then you can handle the grid.Model.QueryColWidth event and conditionally set the width to show them if you are printing. Here is a sample. http://www.syncfusion.com/Support/user/uploads/GDBG_PrintHidden_d33a1a91.zip

Hoang Dinh
Replied On June 15, 2005 10:33 PM

Thank for your help. And now, I can print all colums in the datagrid. But I see another issue. The screen flash some colums when I show the datagrid. Ex: this.dataGrid.DataSource = dt; this.dataGrid.Model.ColWidths["Col0"]=0; this.dataGrid.Model.ColWidths["Col1"]=0; this.dataGrid.Model.ColWidths["Col2"]=0; Result: The Col0, Col1 and Col2 in the grid is flashed. Please help me to resolve this issue so the user doesn''t see this flashing. Thanks, Hoang

Administrator [Syncfusion]
Replied On June 16, 2005 03:47 AM

Call this.dataGrid.BeginUpdate() before you set the datasource, and call this.dataGrid.EndUpdate after you set the ColWidths followed by this.dataGrid.Refresh().

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.

;