Apply formatting for columns in ASP.NET Webforms Grid

23 Feb 20231 minute to read

Column format can be used dynamically to change data values format with the help of the public method. The following code example illustrates the Essential JavaScript with column formatting in public method.

  • C#
  • var grid = $("#Grid").data("ejGrid");
    
    var column = grid.getColumnByField("fieldName");
    
    column.format = "{0:n2}";
    
    grid.refreshContent(true);