CurrentCellChanged

G

Guest

In the CurrentCellChanged event for my datagrid, I have the following:

Dim curRow As Integer = Me.dgrdBids.CurrentCell.RowNumber
Dim pricing As Single = Convert.ToSingle(Me.dgrdBids.Item(curRow, 4))
Me.dgrdBids.Item(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!!
 
C

Chris, Master of All Things Insignificant

Do you just need to refresh the grid or invalidate the cell that you
changed? Just a thought.

Chris
 
G

Guest

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.
 
C

Chris, Master of All Things Insignificant

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.ColumnChanged, addressof .......

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top