AutoGenerate columns format

2 posts, 0 answers
  1. Robert Madrian
    Robert Madrian avatar
    225 posts
    Member since:
    Apr 2003

    Posted 05 Apr 2017 Link to this post


    I use the following MVC Grid with AutoGenerate columns because we use a query builder and the result are always different resultsets with different columns...

    the Problem with that solution is the Format for specific columns like date, datetime and boolean, because they are not formatted the right way

    is there a possibility to format specific columns if to use AutoGenerate columns?


          .Columns(columns => columns.AutoGenerate(true))
          .Scrollable(s => s.Height("auto"))
          .Filterable(f => f.Enabled(false))
          .DataSource(dataSource => dataSource
              .Read(read => read.Action("ReadAsync", "Home").Data("GetQuerySQL"))
              .Events(e => e.Error("gridError"))
  2. Tsvetina
    Tsvetina avatar
    2481 posts

    Posted 06 Apr 2017 Link to this post

    Hello Robert,

    It is not possible to apply settings to auto-generated columns in the Grid. However, you could consider following the approach in this sample to replace auto-generated columns with dynamically building the Columns collection:
    Bind the Grid to DataTable

    If you want to take a quick look at the main logic of the example, check this file.

    Telerik by Progress
    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.
Back to Top