title: kendo switch button in asp.net mvc
body: <p>I have a kendo switch button, like this:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div class="col-md-2 form-group"&gt;
      &lt;input id="euro-switch" aria-label="euro Switch" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and this is the jquery:</p>
  
  <pre class="lang-js prettyprint-override"><code>$("#euro-switch").kendoMobileSwitch({
      onLabel: "€",
      offLabel: "%",
      change: function (e) {
          $('kendoNumericTextBox').value                    
      }
  });
  </code></pre>
  
  <p>and I have a numerictextbox:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div class="col-md-2 form-group"&gt;
          @(Html.Kendo().NumericTextBox()
              .Name("SignalThreshold")
              .Value(0)
              .Step(10)
              .Min(0)
              .Events(e =&gt; e.Change("FilterThresholdChange"))
              .Format("'€' ##.00")
          )
  &lt;/div&gt;
  </code></pre>
  
  <p>Now I want to toggle between euro and percent so that you will see euro sign (€) or % sign in the numerictextbox.</p>
  
  <p>How can I do that?</p>
  
  <p>Thank you</p>
  
  <p>oke, 
   I have it now like this:</p>
  
  <pre><code> $("#euro-switch").kendoMobileSwitch({
  
  
              onLabel: "€",
              offLabel: "%",
              change: function (e) {
  
                  var label = e.sender.value() ? e.sender.options.onLabel : e.sender.options.offLabel.toString();
                  var inpbox = $('#SignalThreshold').data("kendoNumericTextBox");
                  console.log(inpbox)
                  inpbox.setOptions(
                      {
                          format: "\\" + label + "\\ #",
                          decimals: 3
                      });
                  inpbox.value(inpbox.value());
              }
  
          });
  
  
          $("#SignalThreshold").kendoNumericTextBox({
              format: "\\%\\ #",
              decimals: 3,
              value: 1
  
          });
  </code></pre>
  
  <p>and this is my kendo numerictextbox:</p>
  
  <pre><code> @(Html.Kendo().NumericTextBox()
                                      .Name("SignalThreshold")
                                      .Value(0)
                                      .Step(10)
                                      .Min(0)
                                      .Events(e =&gt; e.Change("FilterThresholdChange"))
                                      .Format("'€' ##.00")
          )
  </code></pre>
  
  <p>But this doesn't work.</p>