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

Print all columns are hidden

Thread ID:





30274 Jun 15,2005 08:30 AM UTC Jun 16,2005 07:47 AM UTC WinForms 3
Tags: GridControl
Hoang Dinh
Asked On June 15, 2005 08:30 AM UTC

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 09:13 AM UTC

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 16, 2005 02:33 AM UTC

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 07:47 AM UTC

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


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