Jump to content

DBGrid refresh column total of row after edit column qty?


TuanHoang

Recommended Posts

Hello

 

I want to refresh column total of row after edit column qty. 

 

I change total on qty field event OnChange, qty's OnChange : tblOrderDetailTotal.Value := tblOrderDetailQty.Value * tblOrderDetailAmount.Value;

 

On VCL field total will be update with new value, but on Unigui it is not updated.

 

If I call DataSet's Post or click Post on DBNavigator field total will be update.

 

How to refresh column total after event qty's OnChange.

 

Sorry for my English.

 

Tuan. 

  • Like 1
Link to comment
Share on other sites

Please set DBGrid.Options.AutoRefreshRow = True

 

Also you can use unidbgrid.refreshcurrentrow;

 

Thanks you. RefreshCurrentRow is working.

 

But I has error when press tab to next col when grid is editing, column 3's value must be 0 after change value of column 2.

 

Here is error when press tab : ae1koy.gif

Here is ok when press enter : fux8nm.gif

 

Is there any way to put delay after column 2 lost focus before column 3 has focus?

Edited by Tuan
Link to comment
Share on other sites

I try to use TUniDBEdit instead of TUniEdit. Value of column 4 will be updated from 200 to 0 when press tab., but originalValue is still 200.

 

I debug http and found request : Ajax=1&IsEvent=1&Obj=O229&Evt=edit&VR=&V=0.00&O=200&R=0&C=3&RN=undefined&_S_ID=EtfhXXORhh100714B47&_seq_=22&_uo_=O16D

 

Is there any way to update originalValue to value when control has focus? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...