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

How can I remove the selection of row ?

Thread ID:





28661 May 6,2005 09:07 AM UTC May 7,2005 10:16 AM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On May 6, 2005 09:07 AM UTC

I wouldn''t like to have any selection on grid. How can I do that ? Thank you very much

Eric Luk
Replied On May 6, 2005 09:34 AM UTC

Hi David, You may try adding this row : grid.AllowSelection = GridSelectionFlags.None; Thx! Eric

Administrator [Syncfusion]
Replied On May 7, 2005 09:50 AM UTC

I did it, but It can''t remove the selection. I don''t know why. ( I used event Currentcell_activating) Thanks

Administrator [Syncfusion]
Replied On May 7, 2005 10:16 AM UTC

If you set grid.AllowSelection = none in Form.Load (and do not have ListBoxSelectionMode set to something other than none), your user should never be able to select anything. So, no selection will be need to be removed. In general, to clear all selections, you call grid.Selections.Clear(). But if ListBoxSelectionMode is set to something other than none, the grid may reselect the row after it is cleared or whenever you user clicks another cell. If you have ListBoxSelectionMode set to something other than None, then you will have something problem trying to not have a selected row. Setting this property indicated you always want to see a whole row selected when the user clicks on the grid.


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