Formatstring values problem

2 posts, 0 answers
  1. Jean-Pierre
    Jean-Pierre avatar
    3 posts
    Member since:
    Nov 2017

    Posted 28 Dec 2018 Link to this post

    I'm a L4G Progress developper and I just use TELERIK Objets in my programs like the RadGridview.
    And I can't format my decimal columns in a RadGridView.
    Decimalplaces propriety has no effect and all tested values like "{0:C}" or "{###.##}" for the formatstring propriety are not allowed.
    May be I miss some classes which allows these values ????
    I'm sorry but I'm a beginner with .Net developpement.

    Thanks a lot for your answers.


  2. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4120 posts

    Posted 28 Dec 2018 Link to this post

    Hello, Jean-Pierre, 

    You can define how many places after the decimal point the value in the spin editor should have by setting the DecimalPlaces property of GridViewDecimalColumn. In order to define how the values should be displayed by the cells of the GridViewDecimalColumn while the cell is not being edited in the sense of their decimal places, we should set the FormatString property of the column.

    GridViewDecimalColumn decimalColumn = new GridViewDecimalColumn();
    decimalColumn.Name = "DecimalColumn";
    decimalColumn.HeaderText = "Unit Price";
    decimalColumn.FieldName = "UnitPrice";
    decimalColumn.DecimalPlaces = 3;
    decimalColumn.FormatString = "{0:C}";
    for (int i = 0; i < 10; i++)

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top