Thoussand Seprator for integer

2 posts, 0 answers
  1. Mohammad Anas
    Mohammad Anas avatar
    5 posts
    Member since:
    Apr 2018

    Posted 16 Apr 2018 Link to this post

    i donot have decimal column how to use thousand separator for specific column.
  2. Dimitar
    Admin
    Dimitar avatar
    2949 posts

    Posted 17 Apr 2018 Link to this post

    Hello  Mohammad,

    You can use the CellFormatting event and format the text in any way you want. Here is an example:
    void radGridView1_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
    {
        if (e.Column.Name == "Value" && e.CellElement.Value != null)
        {
            var value = e.CellElement.Value.ToString();
            e.CellElement.Text = string.Format("{0:#,##0.00}", int.Parse(value));
     
        }
    }

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular 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