This is a migrated thread and some comments may be shown as answers.

Thoussand Seprator for integer

1 Answer 12 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mohammad Anas
Top achievements
Rank 1
Mohammad Anas asked on 16 Apr 2018, 02:05 PM
i donot have decimal column how to use thousand separator for specific column.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 17 Apr 2018, 08:42 AM
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.
Tags
GridView
Asked by
Mohammad Anas
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or