Hi Mike,
am trying to get my issue sorted out. This is my scenario.
I added 2 dynamic columns A and B in the grid and in Col B , set the formula as Col A * 10.
When i change cell value for Col A in the grid , Col B gets recalculated BUT when i set the value for the Col A in the underlying object instead of (updating the cell directly in teh grid ), Col B doesn't recalculate.
It gets refreshed when i apply column filtering. This looks to me like a Notification issue. I really appreciate ur suggestions.
Thanks,
Valliappan
Hello Valliappan,
I tried this and it always works fine for me so I attached my sample to this post for you. Please review it and feel free to let me know if I misunderstood you or if you have any other questions.
Hi Boris,
2 things are different from the way i do.
- User can add a new column in the run time into the grid. and am achieving this through propertyDescriptor. Col A and Col B are added this way.
- Assuming Col B have formula Col A * 10. If i update cell COL A directly in the grid, Col B gets recalculated properly and it works fine BUT if i update the object corresponding COL A and call Notify , it updates COL A in the UI BUT Col B is not refreshed immediately until i hit on Filter on the col B.
please let me know if your are still not clear.
Hi Valliappan,
Adding the property descriptor at run-time should not make any difference. I assume that the grid is displaying the column, so that's clearly not a problem.
Updating the field in the data source (instead of through the grid) should work, too. The only case where this will not work is if the BindingManager does not notify the grid of the change.
Does the cell you are updating reflect the new value? If so, then the grid must be getting some kind of notification. Either that, or something in your code is making the grid repaint after the value changes.
If the grid is getting a notification from the data source, then it will update the cell and recalculate the formula. This depends on your data source, of course. Since you said you are adding a property descriptor, it sounds like you have implemented your own data source. So my guess is that your data source is not sending the proper notifications when you change the value of a field.
The cell am updating clearly reflects the new value (so Grid is getting notification) BUT the column which have dependency on this column doesn't reflect in the UI .
If i click some Filter on that column, then it refreshes the UI.
If the data source is not sending proper notification, still source cell shdn't hv got the updated value in the UI too?
BUT thats working.
I wanted to know if you were able to solve your issue based on these suggestions or you still need help. Please let me know.