problem with decimal places in DataGrid

databases Ukraine
  • 15 years ago

    Hi, guys
    Could someone help to make DataGrid show in sells figures with 2 decimal places. Mask like ###,## neglects “0” so instead "0,20" it gives ".2" or instead "2,00" – "2."


    Thanks in advance

  • 15 years ago

    hi,
      to display data  in DataGrid with required format, we can use format function as follows.


     datagrid.textmatrix(rowno,colno)=format(datagrid.textmatrix(rowno,colno),"0.00")


    regards
    vamshi.

  • 15 years ago

    Hi vamshi
    Works perfect
    Thanks a lot


    Regards
    Holmes


Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are 10 types of people in the world, those who can read binary, and those who can't.”