473,394 Members | 1,794 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,394 software developers and data experts.

What's the datagrid event when user selects a different row?

I've looked through all the event members of a datagrid but I can't find one
that's for when user selects a different row in the datagrid. How does one
catch this type of event?

Thanks, Alpha
Nov 17 '05 #1
3 1331
Alpha,

You want to sign up for the CurrentCellChanged event. It will fire any
time the cell is changed. You just have to check to see if the row on the
cell changed.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alpha" <Al***@discussions.microsoft.com> wrote in message
news:48**********************************@microsof t.com...
I've looked through all the event members of a datagrid but I can't find
one
that's for when user selects a different row in the datagrid. How does
one
catch this type of event?

Thanks, Alpha

Nov 17 '05 #2
Thanks again Nicholas.

"Nicholas Paldino [.NET/C# MVP]" wrote:
Alpha,

You want to sign up for the CurrentCellChanged event. It will fire any
time the cell is changed. You just have to check to see if the row on the
cell changed.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alpha" <Al***@discussions.microsoft.com> wrote in message
news:48**********************************@microsof t.com...
I've looked through all the event members of a datagrid but I can't find
one
that's for when user selects a different row in the datagrid. How does
one
catch this type of event?

Thanks, Alpha


Nov 17 '05 #3
Nicholas,

I need to save the changes in the textbox (on the same form) to the dataset
table and then use SqlDataAdapter.update when user choose a different row on
the datagrid or close the form.

Now I know which row they're on(that should still be the current row,
right?) when the user click on another row but how do I pin-point which row
in the dataset table that I should assign the textbox.text to ? The row
number in the datagrid, that doesn't mapped to the row number of the dataset
table, does it?

Thanks, Alpha

"Nicholas Paldino [.NET/C# MVP]" wrote:
Alpha,

You want to sign up for the CurrentCellChanged event. It will fire any
time the cell is changed. You just have to check to see if the row on the
cell changed.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Alpha" <Al***@discussions.microsoft.com> wrote in message
news:48**********************************@microsof t.com...
I've looked through all the event members of a datagrid but I can't find
one
that's for when user selects a different row in the datagrid. How does
one
catch this type of event?

Thanks, Alpha


Nov 17 '05 #4

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

Similar topics

2
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell...
2
by: Paul Sampson | last post by:
Hello, The DataGrid.CurrentCellChanged requires too much overhead to determine when only the row has changed. Can anyone suggest a way to fire an event when the user selects a different row...
6
by: BBFrost | last post by:
I'm using Net 1.1 (2003) SP1 & Windows 2000 Here's the issue ... Rows 12 thru 24 are selected in a datagrid. The user now unselects rows 12 thru 24 and selects rows 45 thru 70 ??? How can...
1
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls...
0
by: Luis Esteban Valencia | last post by:
Hello. I have a datagrid with one row. I have a button that adds a new row. I am trying to implement that when the user selects one product it must change the price on the quantity column. Anyway...
5
by: Kurt Schroeder | last post by:
I'm using VS.net. I have created a component with the basic set of database commands. This component returns a record set that is bound to a datagrid. I want to add a dynamic sort, but am not sure...
3
by: Reney | last post by:
I haven't used the VS Studio's drag&drop method to create my connection, adapters and datasets, but I typed them all. The situation is like this: There is a listbox with members pulled from the...
3
by: Phillip N Rounds | last post by:
I have a DataGrid in a web form (ASP1.1, C#, VS 2003) that I'm trying to add some functionality to, and I can't figure out how to do int. The existing DataGrid has several databound columns and a...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
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...
0
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...

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.