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.

Force to highlight row on selection, and related some program problem

Thread ID:

Created:

Updated:

Platform:

Replies:

119930 Aug 15,2015 03:15 AM Aug 18,2015 07:01 AM Windows Forms 3
loading
Tags: GridGroupingControl
Michael K
Asked On August 15, 2015 03:15 AM

Dear Sir :

Today, I have read your example 
https://www.syncfusion.com/kb/644/how-to-select-the-whole-row-wherever-you-click

to force the grid control to select whole row on user click any cell

However, we have get some problem after that:
1. When I complete our statement and dispose the form, it will get exception error and the source come from "Syncfusion.Grid.Grouping.Windows" <- I can skip this error under the exception case
2. The Text in custom filter bar will not be work.

Therefore, is that any good way to force user to select the whole row (without using event method?)

Thanks

Michael 

Venkatesh Sundaram [Syncfusion]
Replied On August 17, 2015 09:17 AM

Hi Michael,

Thank you for your interest in Syncfusion products.

To select the whole row without using the events, you can use the property ListBoxSelectionMode.

Code snippet:


//Disables the grid selection
gridGroupingControl1.TableOptions.AllowSelection = Syncfusion.Windows.Forms.Grid.GridSelectionFlags.None;


//Used to select the whole row

gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.One;

Let me know if you have any queries.

Regards,

Venkat.


Michael K
Replied On August 18, 2015 04:31 AM

Dear Venkat:

Thank for your advise, it work, 
but for solving selection cell background color is different from other column , 
I have add one more code
 gridGroupingControl1.TableOptions.ListBoxSelectionCurrentCellOptions = GridListBoxSelectionCurrentCellOptions.None

Thanks

Michael

Venkatesh Sundaram [Syncfusion]
Replied On August 18, 2015 07:01 AM

Hi Michael,

Thanks for the update.

If you set the ListBoxSelectionCurrentCellOptions as None, the current cell drawn with the same color used for highlighting the whole record. Please refer the below kb for reference.

http://help.syncfusion.com/ug/windows%20forms/index.html#!Documents/recordbasedselection.htm

http://help.syncfusion.com/ug/windows%20forms/index.html#!Documents/focusedselection.htm


Please let us know if you have any concern.

Regards,
Venkat


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.

;