Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
igCurrencyEditor usage and copy to other fields

I have below value which I key in and I want automatically to copy over Limit to Option A currency editor including the formatting.

@(Html.Infragistics().CurrencyEditorFor(m => m.BBROptionsEditViewModel.AddCoverage[k].QuoteAddCoverage.Limit, new { id = "option-limit" + i, @class = "option-value cell option-limit" }).Render()) 

@(Html.Infragistics().CurrencyEditorFor(m => m.BBROptionsEditViewModel.AddCoverageBBR[k].QuoteAddCoverageBBR.OptionA, new { id = "A-Option" + i, @class = "option-value value-input cell" }).Render())

I tried to use the below javascript code but only the value is reflecting but thre prefix of $ and thousand separator is missing.Is there any way I can handle this?

var strOptionA = "input[name='BBROptionsEditViewModel.AddCoverageBBR[1].QuoteAddCoverageBBR.OptionA']"

No Data
  • 80
    Verified Answer
    Offline posted

    Hi Jois,

    Thank you for reaching out to us!

    In the last code snippet you've provided, you're getting the native input and setting it's value directly, instead of going through the `igCurrencyEditor`.

    You could try setting the value with `$(strOptionA).igCurrencyEditor("option", "value", valueToCopy)` and it should work properly.

    Here is a small JSFiddle example illustrating the difference in the two approaches.