Page 1 of 1

Grid with Calculated Column

Posted: Mon Mar 16, 2009 9:57 am
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

Re: Grid with Calculated Column

Posted: Mon Mar 16, 2009 10:10 am
by Rathinagiri
Can you kindly provide a sample prg?

Re: Grid with Calculated Column

Posted: Mon Mar 16, 2009 10:30 am
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

Re: Grid with Calculated Column

Posted: Mon Mar 16, 2009 11:59 am
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?

Re: Grid with Calculated Column

Posted: Mon Mar 16, 2009 12:14 pm
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