473,734 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CurrentCellChan ged

jmb
In the CurrentCellChan ged event for my datagrid, I have the following:

Dim curRow As Integer = Me.dgrdBids.Cur rentCell.RowNum ber
Dim pricing As Single = Convert.ToSingl e(Me.dgrdBids.I tem(curRow, 4))
Me.dgrdBids.Ite m(curRow, 6) = pricing * .25

When the value is changed in the pricing cell (curRow, 4) the value for the
25%cell (curRow, 6) does not change until you leave and re-enter the pricing
cell where you made the change. I want the change in the 25% cell to happen
as soon as you leave the pricing cell after making the change. I am, once
again, missing something obvious. All help is oh so appreciated!!
Nov 21 '05 #1
3 3790
Do you just need to refresh the grid or invalidate the cell that you
changed? Just a thought.

Chris

"jmb" <jm*@discussion s.microsoft.com > wrote in message
news:BC******** *************** ***********@mic rosoft.com...
In the CurrentCellChan ged event for my datagrid, I have the following:

Dim curRow As Integer = Me.dgrdBids.Cur rentCell.RowNum ber
Dim pricing As Single = Convert.ToSingl e(Me.dgrdBids.I tem(curRow, 4))
Me.dgrdBids.Ite m(curRow, 6) = pricing * .25

When the value is changed in the pricing cell (curRow, 4) the value for
the
25%cell (curRow, 6) does not change until you leave and re-enter the
pricing
cell where you made the change. I want the change in the 25% cell to
happen
as soon as you leave the pricing cell after making the change. I am, once
again, missing something obvious. All help is oh so appreciated!!

Nov 21 '05 #2
jmb
I need the 25% cell to reflect any changes made to the pricing cell as soon
as the user moves on to another cell. So if the original value in pricing is
100 and the original value in 25% is 25, if the user changes the pricing to
200 and moves to another cell the 25% cell should immediately update to 50.
As it stands right now, the update to the 25% cell does not happen unless you
move to another cell and then move back to the cell in which my made the
change.

It's a Windows form I'm working with and VB.Net in the Visual Studio 2003
environment.

"Chris, Master of All Things Insignifican" wrote:
Do you just need to refresh the grid or invalidate the cell that you
changed? Just a thought.

Chris

"jmb" <jm*@discussion s.microsoft.com > wrote in message
news:BC******** *************** ***********@mic rosoft.com...
In the CurrentCellChan ged event for my datagrid, I have the following:

Dim curRow As Integer = Me.dgrdBids.Cur rentCell.RowNum ber
Dim pricing As Single = Convert.ToSingl e(Me.dgrdBids.I tem(curRow, 4))
Me.dgrdBids.Ite m(curRow, 6) = pricing * .25

When the value is changed in the pricing cell (curRow, 4) the value for
the
25%cell (curRow, 6) does not change until you leave and re-enter the
pricing
cell where you made the change. I want the change in the 25% cell to
happen
as soon as you leave the pricing cell after making the change. I am, once
again, missing something obvious. All help is oh so appreciated!!


Nov 21 '05 #3
Did you try to call a Datagrid.update method after changing the value in the
second cell? That's what I ment by "refresh the grid"

You could also try doing the change in the ColumnChanged event

Addhanlder Table.ColumnCha nged, addressof .......

Chris
"jmb" <jm*@discussion s.microsoft.com > wrote in message
news:47******** *************** ***********@mic rosoft.com...
I need the 25% cell to reflect any changes made to the pricing cell as
soon
as the user moves on to another cell. So if the original value in pricing
is
100 and the original value in 25% is 25, if the user changes the pricing
to
200 and moves to another cell the 25% cell should immediately update to
50.
As it stands right now, the update to the 25% cell does not happen unless
you
move to another cell and then move back to the cell in which my made the
change.

It's a Windows form I'm working with and VB.Net in the Visual Studio 2003
environment.

"Chris, Master of All Things Insignifican" wrote:
Do you just need to refresh the grid or invalidate the cell that you
changed? Just a thought.

Chris

"jmb" <jm*@discussion s.microsoft.com > wrote in message
news:BC******** *************** ***********@mic rosoft.com...
> In the CurrentCellChan ged event for my datagrid, I have the following:
>
> Dim curRow As Integer = Me.dgrdBids.Cur rentCell.RowNum ber
> Dim pricing As Single = Convert.ToSingl e(Me.dgrdBids.I tem(curRow, 4))
> Me.dgrdBids.Ite m(curRow, 6) = pricing * .25
>
> When the value is changed in the pricing cell (curRow, 4) the value for
> the
> 25%cell (curRow, 6) does not change until you leave and re-enter the
> pricing
> cell where you made the change. I want the change in the 25% cell to
> happen
> as soon as you leave the pricing cell after making the change. I am,
> once
> again, missing something obvious. All help is oh so appreciated!!


Nov 21 '05 #4

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

Similar topics

8
7844
by: amber | last post by:
Hello, How can I trigger an event, when a value (cell) in my datagrid changes? TIA, amber
1
12305
by: Lester Moreno | last post by:
Hello all, I'm trying to find a way to get a event raised when you change some text on a DataGrid Cell, I need to be able to search in another table what the user typed on that cell. I found this, but this only give me the row and the cell I change position to.
4
7372
by: Suzanne | last post by:
Hi all, I'm having problems with datagrids and the currentcellchanged event. My problem is this: I have a datagrid on a form, if the user changes the text in a cell on the datagrid then tries to close the form via a button on the toolbar (with going to another cell in the datagrid)I want to be able to popup a messagebox to the user asking them if they want to keep their changes. At the momment I'm accomplishing this by a property that...
0
1050
by: Djimbo | last post by:
How can i select another Fullrow from DataGrid in CurrentCellChanged Handler function?
1
408
by: J | last post by:
Hi, all I am working on a windows application which need to write to a log file if any user changed the current cell's data. I am using CurrentCellChanged property to monitor this situation. But I found this property raised if user just moved from cell to cell even they did not change anything in the cell. I can not figured this one out. Any one have similar problem before or any suggestion? thanks in advance.
1
1395
by: jason via DotNetMonster.com | last post by:
Hi, all I am working on a windows application which need to write 'column name', 'new data' to a log file if any user changed the current cell's data. I am using CurrentCellChanged property to monitor this situation. But I found this property raised if user just moved from cell to cell even they did not change anything in the cell, also I cannot figured out how do I know the data has been changed and hot to get new data. Any one can...
0
2937
by: tcdmail | last post by:
Hello, I'm a kind of newbie in C# and I've a question regarding the DataGridView control in VS2005. The problem I have is the following: I have a form with some labels on it, when a user clicks on it another form is called. This last form contains a split container with in the left part a datagridview. In the right part i've added a label which shows a value from a column in the datagrid. So when i change the row, the label must be...
0
957
by: Stephen Plotnick | last post by:
My program goes into this routine no matter what I do. I would think it would only go in this routine if the current cell changes.
0
1824
by: Diogo Alves - Software Developer | last post by:
Greetings Everyone! Here's my issue, I have a datagridview, and I'm already using currentCellChanged Event. What I want to do is... before the currentCellChanged, check if the user any changes do the details panel for that row, and ask him if he wants to save the changes on the details, then rebind the grid. Currently it gives me an error cause the check was inside the
5
2008
by: cj | last post by:
This should be easy. I have a datagrid filled with data and when I click on a cell I want that data displayed in a text box. How do I do this? Thanks. P.S. this is a 2005 windows app.
0
8946
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 usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8776
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9449
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9236
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9182
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
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

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.