[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2379
  • Last Modified:

True DBGrid number format

Hello there

  I recently downloaded the True DBGrid Standard from the Apex Site.
  The problem I have is that I can't make the DBGrid force the values in certain cells to be displayed with 2 decimal places. If the value is entered with decimal places, it is displayed with them, otherwise, it is not. I already tryed to specify, in the DBGrid properties, the format for the values, but it still doesn't work. If I browse my table, with MS
Access, the values are displayed correctly, but not in the True DBGrid.

  Am I doing something wrong?
  How am I supposed to do it?
0
rbarradas
Asked:
rbarradas
  • 2
1 Solution
 
dansariCommented:
rbarradas:

Have you tried to set the format of the column object to "0.00"?  This should force 2 decimal places to be displayed.  It does with my True DBGrid (Pro).
0
 
rbarradasAuthor Commented:
It still doesn't work.
Maybe I'm doing something wrong. I've already tryed to format the cell in  design and in run time mode. Any other ideas?
Thanks...
0
 
gikassCommented:
I assume you are talking about formatting of data you read off a database.

As far as I know, you do not format a CELL, you must format a column.
Use the NumberFormat property of the COLUMN object:

DataGrid1.Columns(j).NumberFormat = "###0.00"

0
 
rbarradasAuthor Commented:
It still doesn't work. I don't know if I am doing it the right way. To populate the Grid I'm using a Data Control. Where Am I supposed to put that instruction?
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now