473,566 Members | 3,307 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagridview Selection Change

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 SelectionChange d event (using Full Row Select),
but this event is trigger only after the selection changed is completed and
therefore is non cancelable unless you keep the previous selection in a
variable and rechange the selection, which is painful.

I've try many other event like click and Row/Column change to see if any
was cancelable or trigger before the selectionchange d but have not find any.

So if anyone know a clean way to prevent a selection changed, please let
me know.

BTW this is using VS2005 and .NET 2.0

Thank

ML
Mar 17 '06 #1
0 4991

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

Similar topics

1
4265
by: cc | last post by:
Hi, using the DataGridView (.NET 2005) : I have a row currently selected in the Grid (say the 3rd row showing 'Product3') Now, when I click on a column to sort the records is the 'Product3' row located as first row in the Grid but not selected (highlighted) anymore. The position of the selected (highlighted)-row doesn't change and is...
11
109583
by: dgk | last post by:
Is there a way to change the foreground or background color of a single cell in an unbound datagridview?
4
4754
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 move the selection up 1 row How do I do that
6
50415
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 DataTable. No problem here. However, when I add data (programatically) to the DataTable, the DataGridView does not refresh right away. If I minimize...
2
9412
by: martin1 | last post by:
Hi, All, The datagridview auto-select first column first row data and the slected cell background color is blue, so how to turn off the select? or how to change selected cell backcolor to white? Thanks
3
1181
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
I have a datagrid view with two combobox's. These are populated by lookup tables. I need one column to change what is loaded into the other. How do I do this on code? I don't thnk this method will work: scriptDataGridView.Value = "some SQL statement" Ideas please?
2
5939
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 RowCount would give me this :- Summary: Gets or sets the number of rows displayed in the System.Windows.Forms.DataGridView.
6
4402
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 (Multiselect=false) from DGV - to do that I tried this: DGV.ClearSelection() Cosmetically this appears to work but it appears that the DGV still stores the index...
2
1467
by: Dom | last post by:
I posted this before, no takers. Trying again. Is there anyway to cancel the selection of a new cell in a DataGridView? For example, if the user selects a cell with the control key down, then I don't want the selection to change. Dom
0
7673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7893
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8109
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7645
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6263
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2085
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.