Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

True DBGrid number format

Posted on 1997-07-30
4
Medium Priority
?
2,290 Views
Last Modified: 2012-08-13
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
Comment
Question by:rbarradas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Expert Comment

by:dansari
ID: 1429015
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
 
LVL 1

Author Comment

by:rbarradas
ID: 1429016
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
 

Accepted Solution

by:
gikass earned 200 total points
ID: 1429017
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
 
LVL 1

Author Comment

by:rbarradas
ID: 1429018
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question