modify grid column format

2 posts, 1 answers
  1. steven
    steven avatar
    1 posts
    Member since:
    Jul 2016

    Posted 27 Jul Link to this post

    hi, i want to modify grid column format, i do it, but didn't work : 

    var grid = $("#grid").data("kendoGrid");

    grid.columns[1].format = "{0:C0}";

    sample is here

    Thank a lot 


  2. Answer
    Konstantin Dikov
    Konstantin Dikov avatar
    1744 posts

    Posted 28 Jul Link to this post

    Hi Steven,

    You should modify the options of the Grid and pass them as parameters to the setOptions method. This will re-initialize the widget with the new options:
    $('#currency').change(function () {
          var grid = $("#grid").data("kendoGrid");   
      var options = grid.options;
      options.columns[1].format = "{0:C}";

    Hope this helps.

    Konstantin Dikov
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top