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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Automatic row selection

Thread ID:





16267 Jul 9,2004 01:42 PM UTC Jul 9,2004 02:35 PM UTC WinForms 1
Tags: GridControl
Supriya Thakur
Asked On July 9, 2004 01:42 PM UTC

We are using GridDataBoundGrid control. When the grid shows us (on an undocked form) at times, any of the rows of the grid gets automatically selected(shaded blue). We do not want any row to show up selected till it is clicked by the user. We tried setting the selected row index to -1. It works but the grid throws an internal exception. Can you please suggest a resolution ? Thanks, Supriya

Administrator [Syncfusion]
Replied On July 9, 2004 02:35 PM UTC

I am not sure I understand what you are describing? Do random rows appear selected the very first time the grid is drawn? I would not know what would cause this without seeing a sample. The default behavior of a griddataboundgrid is to not show selections when the grid loses focus. You can see this in our samples. (The GridFilterBar sample shows any selections in teh grid being lost when you click on the text on teh combobox at the top, or on any of the buttons on the form.) Are you handling any events or overrides that might be affecting this normal behavior, like SelectionsChanging or any of the validation events like CurrentCellValidating or RowLeave that might not let the focus leave the grid. Something to try might be to handle the grid.Leave event and in the handler, call grid.Selections.Clear (though this is normally not needed). If you can tell us how to see the problem in one of our samples, or post a sample showing the problem, we might be able to suggest something else.


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

Live Chat Icon For mobile
Live Chat Icon