Problem with DataGridView & Csla

Problem with DataGridView & Csla

Old forum URL: forums.lhotka.net/forums/t/829.aspx


Bonio posted on Monday, August 07, 2006

I have a grid bound to a customer orderlist object (via a bindingsourcontrol). When a product code is keyed in, the valid price is retrieved and shown on the grid.

The problem is as follows:

When a user inputs a quantity, the object calculates the extended price for that item (qty*price), however, this does not show-up in the ExtPrice cell until I have moved off the row.

I have tried adding the BindingSourceRefresh to the form. but to no avail.

Any suggestions gratefully received,

TIA

Bonio

ajj3085 replied on Monday, August 07, 2006

I think this is just how the grid works; I don't think you can change it.  How does the grid know you're done typing unless you accept the entry by moving off or hitting the accept key (I dont' recall which one that is.. enter perhaps?).

Bonio replied on Monday, August 07, 2006

I don't think I made myself clear in my originl question.

The problem is, I can enter values in a row (quantity, price) etc, move off those cells (so the edit is committed) and still the calculated sells are not updated. If I move the across the calculated cells with the grid cursor, they magically show their calculated values. Strangely this problem does not manifest itself in the first row of the grid where all the calculated sells are immediately updated when I press enter after inputting a quantity.

I have tried C1 Flexgrid as well and still get the same problem.

 

Bonio

Jurjen replied on Tuesday, August 08, 2006

When you calculate the value for your property, do you 'set' this property or just the member variable ? If you do the latter, maybe calling PropertyChanged(CalculatedProperty) will solve the problem ?

Jurjen

Bonio replied on Tuesday, August 08, 2006

Thanks for the tip Jurjen, in fact that was exactly what was causing the problem!

Thanks for your help

Bonio

Copyright (c) Marimer LLC