Format number in the datagrid

  • Thread starter Thread starter Jan
  • Start date Start date
J

Jan

Is there a way to display numbers in specified format in
data grid. I know that I can do this converting numbers
to strings but in the grid I want them as numbers
(because of sorting).

For example: number 10 I want to display as 10.00

Thanks,

Jan.
 
Hi Jan,

Use the Format property of the DataGridTextBoxColumn object to specify
desired format.
 
Thanks, it works perfectly.

Jan.
-----Original Message-----
Hi Jan,

Use the Format property of the DataGridTextBoxColumn object to specify
desired format.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Is there a way to display numbers in specified format in
data grid. I know that I can do this converting numbers
to strings but in the grid I want them as numbers
(because of sorting).

For example: number 10 I want to display as 10.00

Thanks,

Jan.

.
 
Back
Top