This is a migrated thread and some comments may be shown as answers.

Client Calculation with Parent field

1 Answer 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Koren
Top achievements
Rank 1
Koren asked on 22 Mar 2011, 11:05 PM
I am trying to do a calcuation in a child grid using javascript but can not seem to figure out how to reference either a field in the nestedviewtemplate or the parent row.

My grids are as follows:
grid1 (with TaxRate bound column)
  nestedviewtemplate
    panel
      multipage
         pageviewPayment
            hiddenfield taxrate
            gridPayment
               PaymentAmount (bound column)
               TaxAmount (bound column)

I have a load client event for TaxAmount to see if it is already populated.  I have a blur event on PaymentAmount to calculate the TaxAmount if not already there.  The TaxAmount should be the PaymentAmount * the TaxRate from the parent grid.  I also have a hidden field in the page view with the tax rate and a label so I know it is picking up the right tax rate.  I can not figure out how to get to any of the TaxRate fields from my blur event.  How do I traverse up through my PaymentAmount field to either the label, the hidden field or the TaxRate from the parent grid?

thanks!

1 Answer, 1 is accepted

Sort by
0
Koren
Top achievements
Rank 1
answered on 23 Mar 2011, 08:56 PM
Never mind on this.  It turns out I will need the tax rate down at the child level also so I can just use it there for the calculation.

thanks!
Tags
Grid
Asked by
Koren
Top achievements
Rank 1
Answers by
Koren
Top achievements
Rank 1
Share this question
or