Tuesday, 19 January 2016

Using Kendo Templates

First our template
<script id="data_upload_result_confirmation" type="text/x-kendo-template">
    <h4>#= firstname # is this information correct?</h4>

    <p style="text-align:center;">
        <button class="delete-confirm k-button">Ok</button>
        <a href="javascript:" class="delete-cancel">no</a>
    </p>

</script> 

Then the code to transform the data then open the window
<script>    

  var kendoWindow = $("<div />").kendoWindow({
      title: "Confirm",
      resizable: false,
      width: 550,
      modal: true
  });

  var template = kendo.template(
      $('#data_upload_result_confirmation').html());    
  var data = { firstname: "Rippo" };    
  var result = template(data);


  kendoWindow.data("kendoWindow")
    .content(result)
    .center().open();

</script> 

3 comments:

  1. Thanks for sharing this Informative content. Well explained. Got to learn new things from your Blog on. .Net Online course

    ReplyDelete
  2. who accepts dogecoin as payment with  Dogecoins A Good Investment   did amazon accept dogecoin.But  conecnection  of dogcoin in world  is  famous in country.you can transfer  ripple to dollars exchange in the world.

    ReplyDelete