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

numeric mvvm not updating programmatically

2 Answers 166 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Neeraj
Top achievements
Rank 1
Veteran
Neeraj asked on 11 Sep 2017, 10:08 AM
Hello, I have nested kendo  so at inner most the code for kendo numeric is as below :

<script id="CustomerHeadsT" type="text/x-kendo-template" class="KendoExtTemplate">
    <div>
        <input data-role="numerictextbox" data-bind="value: Gross_Fare">
        <input data-role="numerictextbox" data-bind="value: Fee.TotalFee"  data-value-update="keyup"> <button type="button" data-role="button"
               data-icon="edit" data-bind="click: OpenCustomerFeeGrid"></button>
         
 
        <div data-role="window" id="CustomerfeeWindow"
             data-title="Customer Fee Breakup" data-modal="true"
             data-width="300"
             data-height="150"  data-visible="false"
             data-bind="events: { open: onCustomerFeeWindowOpened, close: onCustomerFeeWindowClose }">
            <!--<div id="FeeGridContainer" data-template="FeeGrid" data-bind="source: FeeBreakup"></div>-->
            <div data-role="grid"
                 data-editable="true"
                 data-toolbar="['create', 'save']"
                 data-columns="[
                                 { 'field': 'FeeCurrency', 'width': 270 }
                              ]"
                 data-bind="source: FeeBreakup"></div>
        </div>
    </div>
 
</script>


The Gross_Fare and Fee.TotalFee doesnt get binding programatically using set() . The values in viewModel from controller gets set in template but i am not able to change value using set() and ViewModel doesnot get updated if value changed from UI

2 Answers, 1 is accepted

Sort by
0
Neeraj
Top achievements
Rank 1
Veteran
answered on 11 Sep 2017, 12:38 PM
there was my code itself. 
0
Alex Hajigeorgieva
Telerik team
answered on 13 Sep 2017, 10:31 AM
Hello Neeraj,

Thank you for the provided code snippet. 

I will need some more details regarding the exact scenario.You mentioned that the Kendo UI NumericTextBox is nested. Could you please use the below Dojo to replicate the issue which you are experiencing and provide the URL for the updated example? (The Dojo generates a new URL automatically with every change):

http://dojo.telerik.com/@bubblemaster/oHEyU

Look forward to hearing back from you.

Regards,
Alex Hajigeorgieva
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
NumericTextBox
Asked by
Neeraj
Top achievements
Rank 1
Veteran
Answers by
Neeraj
Top achievements
Rank 1
Veteran
Alex Hajigeorgieva
Telerik team
Share this question
or