473,386 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

DataGridView Selection Problems

Hi,

I have a DataGridView control, where I am setting its Datasource
property to a datatable. The DataGridView has it's MultiSelect property
set to false
I also have a handler for the SelectionChanged event.

When I load the data, I set the DataSource property, and then call
ClearSelection() to make sure there are no selected rows.

This fires the SelectionChanged event, with Row 0 being selected, as the
event appears to fire before the selection actually gets changed.
How do I know whether the selection has changed or is about to be
changed? At the moment I just can't tell.
Thanks.
Paul Cheetham
Jul 21 '06 #1
0 1494

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bob | last post by:
1- Inability to easily reset datagridview combobox selection to null Solution - add a contextmenustrip to the column in which you have the combobox on the datagridview. show to user, something like...
0
by: Michel Lapointe | last post by:
Hello, I would like to know if there is an event for the Datagridview control that is trigger before the selection change and is cancelable. I'm currently using the SelectionChanged event...
2
by: tony lock | last post by:
Has anybody found a way to disable a column in DataGridView i.e prevent it being selected. With DataGrid it was fairly easy to check on the column being entered and move the selection to the next...
4
by: steve | last post by:
Hi All I have a datagridview bound to a datatable Due to the use of touch screens I need to be able to scroll the grid in code in response to a button click i.e each button touch (click) will...
6
by: George | last post by:
Hi, I have been encountering a refresh problem with DataGridView, which is bound to a DataTable. When I make updates (Add, Delete, update) to the DataGridView, everything flow nicely to...
0
by: DBC User | last post by:
I have a datagridview and there are 4 coulmns, the user could do sort on any of the columns. After doing sorting. The user could do refresh the datagridview and get another set of data. But when I...
4
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
I am trying to populate a DataGridView Combobox column with a different data binding source (dataset) depending upon a selection made in a previous column. I can handle the previous column but how...
2
by: colin | last post by:
Hi, I need to tell how many rows are visible on the screen, in my DataGridView control so that I can ensure my newly selected row is visible without doing any unecessry scrolling, I thought...
6
by: hzgt9b | last post by:
Using VS2005, VB.NET, I have a windows app with a DataGridView (lets call it DGV). At some point in the life of my app I want to clear the selection of the currently selected row...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.