Hello,
We use the AfterCellUpdate event a lot on our grids. We are expanding some manually calculated items to use the formulas on columns.
We want to know if the cell has been updated via the formula vs. being manually editied. Is there a property that we can check? Most of the formula columns can't be edited but there happens to be two that can either be formulated or manually entered by row (not by column).
Thanks.
Hi,
No, there's no way to tell if a cell's value came from a formula or from being manually entered. In fact, it doesn't really make much sense to have a cell that is the target of a formula and to also allow that cell to be editing by the user, since whatever the user entered will simply be overwritten when the formula is calculated.
Well, the cell is an estimated freight charge for a part based on a % of the sell price of that part.. The user may wish to adjust this amount if it is interfering with getting the sale.
The user on a $5000.00 part may want to adjust it down to some custom #. Hence it being calculated and being edited. There is a flag on the row that lets me know if it has been manually edited so that it will skip being calcuated the way it is now. I guess there is no way for me to use that flag to skip it being calculated through the grids formulas? Maybe through the row initilize event?
There's no way to tell the grid not to calculate a formula for an individual cell. The column is either the target of a formula or it's not.
If you decide to perform your calculations in code in the InitializeRow event, then you can, of course, skip any rows you want.
Another option would be to add an addition column which represents an adjustment that is part of the formula and gets subtracted from the value and allow your users to edit the adjustment rather than editing the estimated freight charge directly. Or make the calculated field a "suggested" freight charge and use a separate editable field for the actual freight charge.
Thanks. I will stick with what I have for now..and do a suggested vs. custom.