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

[Solved] NumericTextBox client-events passing parameters

0 Answers 29 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
James
Top achievements
Rank 1
James asked on 31 May 2011, 01:40 PM
Hi,

My situation is on one page I have more than one (but unknown) instances of a partial view containing this telerik field:

<%=
                   Html.Telerik().NumericTextBoxFor(k => k.ReceiptItemFeatured.Days).MinValue(0).DecimalDigits(0).
                       ClientEvents(k => k.OnChange("DaysFeaturedChanged"))%>

Then I have a cost field that is supposed to display a cost based for each partial view based on this field. The problem is the JS function that displays the cost doesn't work for all partial views because the cost field is named totalCost for each partial view. To fix this I thought to append some number to the field so we can distingiush the fields in each partial view. The problem is then the JS function somehow needs a parameter for us to pass in this number. Is this possible? If not, any thoughts on another way to fix my problem?

What I need to do is pass a parameter to the OnChange function for the text field...

Cost: $<span id="totalCost"></span>

Thanks,
James :-)
Tags
NumericTextBox
Asked by
James
Top achievements
Rank 1
Share this question
or