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

Unselect in GridPrintDocument

Thread ID:





39620 Jan 12,2006 09:25 PM UTC Jan 14,2006 11:17 AM UTC WinForms 5
Tags: GridControl
Administrator [Syncfusion]
Asked On January 12, 2006 09:25 PM UTC

I''m trying to clear the selection in the GridPrintDocument. Is grid.Selections.Clear() the right method ? Cause it''s not removing the selection. If it is i''ll try somethign else. What is hapening is that when a cell is selected the data in it is not being printed, this would be a fast fix. Thank!

stanleyj [Syncfusion]
Replied On January 13, 2006 11:31 AM UTC

Hi Stephane, I think you are using GridControl. I tried printing with selection and could not see any problem. The selections were also cleared for the grid.Selections.Clear() method call before printing. Can you see any odd behavior in the samples that we ship? Best regards, Stanley

Administrator [Syncfusion]
Replied On January 13, 2006 04:23 PM UTC

Does _gridcontrol.Selections.Clear() also work when you have text selected (highlighted) in a cell ?

stanleyj [Syncfusion]
Replied On January 13, 2006 04:48 PM UTC

Hi Stephane, No, but the text selected in a cell are to loose its focus as soon as other control is activated. The selections of cells are the one that remains unaffected when the focus is not on the grid. The Selections.Clear are for the selections of cells and not for the selection of text in a cell. What exactly is your problem? Best regards, Stanley

Administrator [Syncfusion]
Replied On January 13, 2006 06:36 PM UTC

I modified your version of the print to fit on page, now it''s print to fit on x pages. When a cell if highlighted, the highlighted text is not printed unless I do a pritn preview before. I know the problem has to be in my code since your version works but I can''t find where it is, so in the mean time, i''m willing to add this small hack (un highligh text when someone want to print).

stanleyj [Syncfusion]
Replied On January 14, 2006 11:17 AM UTC

Hi Stephane, How are you highlighting the text, Is that right you are manually selecting the text in a cell? If so that selection is not to be present when clicking anywhere else. As an workaround try moving the current cell. this.gridControl1.CurrentCell.MoveRight(); Best regards, Stanley


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