5 posts, 0 answers
  1. MikeB
    MikeB avatar
    42 posts
    Member since:
    May 2008

    Posted 27 Jan 2009 Link to this post

    I have a RadGridView with a GridViewDecimalColumn.  A row has the value of 51.34.  I set the DecimalPlaces property to 0 but the value still displays as 51.34.  Should this not display as 51?
  2. Jack
    Jack avatar
    2333 posts

    Posted 28 Jan 2009 Link to this post

    Hi MikeB,

    The DecimalPlaces property has effect only on the spin editor when editing the cell. You can control the cell appearance through the FormatString property. The following code removes the fraction part from the cell value:

    this.radGridView1.Columns["Value"].FormatString = "{0:0.}"

    I hope this helps. Do not hesitate to write me back if you have any questions.

    Kind regards,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Jippy
    Jippy avatar
    5 posts
    Member since:
    Oct 2012

    Posted 25 Oct 2012 Link to this post

       I have decimal values in telerik grid view data column, i formatted it and showing properly but when i try to edit the value and double click on it, it displays a bunch of zeros after the decimal point.Now i want to remove all those zeros when i double click for editing.Can anybody please help me out on this as soon as possible?
  4. Stefan
    Stefan avatar
    2906 posts

    Posted 30 Oct 2012 Link to this post

    Hi Jippy,

    Thank you for writing.

    If you set the DecimalPlaces property of the column to zero, all decimals should be removed:
    GridViewDecimalColumn col = new GridViewDecimalColumn();
               col.DecimalPlaces = 0;

    I hope this helps.
    Kind regards,
    the Telerik team
    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
  5. Jippy
    Jippy avatar
    5 posts
    Member since:
    Oct 2012

    Posted 22 Nov 2012 Link to this post

    Hi Stefn, Thanks for the reply.
Back to Top