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 wanted to know if you were able to solve your issue based on these suggestions or you still need help. Please let me know.
Hi Valliappan,
I tested this out and it works fine for me. I am attaching my sample here so you can check it out.I am using a DataTable in my sample, just so that I know the data source is sending the correct notifications.
My guess is that either this is a bug in the version of the grid you are using (in which case my sample will not work on your machine) or else your data source is not sending a notification that it should be (and the grid is getting repainted for some other reason).
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.
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.
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.