Grid with Calculated Column

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
sudip
Posts: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 2 times

Grid with Calculated Column

Post by sudip »

Hi,

I am creating an example with Grid with 4 columns :-
Col 1 : Item code
Col 2 : Rate
Col 3 : Qty
Col 4 : Amt (i.e., Rate*Qty)

I want to auto calculate col 4. So which event/property I should try?

I already tried ON CHANGE event and COLUMNVALID properties. But calculation occurs only when user goes to the next row and then coming the the previous row.

I used IETM(nIndex) property to store the changes. Should I use ITEM(nIndex) or CELL(r, c)?

With best regards.

Sudip
With best regards,
Sudip

User avatar
Rathinagiri
Posts: 5324
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 200 times
Been thanked: 210 times
Contact:

Post by Rathinagiri »

Can you kindly provide a sample prg?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
sudip
Posts: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 2 times

Post by sudip »

Thanks Rathinagiri,

I just found (by trial and error method) that ON LOSTFOCUS method works fine.

Yes, I am working on one to many form and shall send very soon.

Thank you again for your support :)

Regards.

Sudip
With best regards,
Sudip

User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Post by swapan »

It seems Sudip ur into Invoice entry - multiple /table entry part where users will add items....

Why ON CHANGE is not working in the rate field?
Thanks & Regards,
Swapan Das

http://www.swapandas.com/

User avatar
sudip
Posts: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 2 times

Post by sudip »

Hello Swapan,

You are correct.

It's nice to see you here.
I just posted some code in "My HMG Projects" section.
Please check the code and send your comments.

Regards.

Sudip
With best regards,
Sudip

Post Reply