Yang91 Posted May 20, 2022 Share Posted May 20, 2022 Hi all, On a uniDbGrid, I want to have a cell content updated based on two other cells content (basically on total = qte * price). I wrote a OnSetCellValue which is as basic as : if (aField.FieldName='PU') then begin if JvmItems.State<>dsEdit then JvmItems.Edit; JvmItems.FieldByName('TotalHT').AsCurrency:=jvmItems.FieldByName('Quantite').AsInteger*cValue); // cValue is a float of Value JvmItems.FieldByName('PU').AsCurrency:=cValue; jvmItems.Post; end; It works fine if I validate the cell (pressing Enter), if I switch to another row or if I press shift-tab (going on the left side cell). But if I press tab, the content of the Total cell stays the same. It looks like the content of the Total cell doesn't reflect the new value of the field. Any idea ? Quote Link to comment Share on other sites More sharing options...
Yang91 Posted May 23, 2022 Author Share Posted May 23, 2022 any idea or suggestion ? Quote Link to comment Share on other sites More sharing options...
Stemon63 Posted May 24, 2022 Share Posted May 24, 2022 I think that you need a "client" operation... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 24, 2022 Share Posted May 24, 2022 14 hours ago, Yang91 said: any idea or suggestion ? This post may help you: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.