473,320 Members | 2,000 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Displaying x decimal places in a datagrid.


Hey guys (and gals!),

I have a dataset brought back from sqsl server, where some of the
columns are already rounded within the dataset (retrieved using SELECT
ROUND(data, decimalplaces) as myData...etc)

In my datagrid, say the value is 1.15, it displays 1.150000000.

Some columns are text columns, some need to only show 2 decimal places,
and others need to only show 1.

Is there an easy way of specifing which datagrid colums show what about
of decimal places somewhere in the code?

Thanks heaps,

Les :)
Nov 21 '05 #1
1 3912
Les,

I think that this link will give you the answer to your question.

http://msdn.microsoft.com/library/de...ormattopic.asp

I hope this helps?

Cor

However you can use the
"Les Hughes" <le**********@datarev.com.au>

Hey guys (and gals!),

I have a dataset brought back from sqsl server, where some of the columns
are already rounded within the dataset (retrieved using SELECT ROUND(data,
decimalplaces) as myData...etc)

In my datagrid, say the value is 1.15, it displays 1.150000000.

Some columns are text columns, some need to only show 2 decimal places,
and others need to only show 1.

Is there an easy way of specifing which datagrid colums show what about of
decimal places somewhere in the code?

Thanks heaps,

Les :)

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number....
10
by: Guy Hocking | last post by:
Hi there, I have an ASP/SQL 7 application that rips data from SQL Views onto an ASP page. I have a money column in a SQL table that contains money income values. When data is input to this...
2
by: Carl G | last post by:
I am storing a 0.000 a System.Decimal in a DataRow. On retrieval the value is only 0 without the three decimal places. It looks like the Get property returns System.Decimal.Zero, but why???? I...
4
by: italia | last post by:
I changed the Fieldsize Property from text to Long Integer and Decimal Places = 6. I had decimals in the original field. But after the transfer, the digits after the decimals are gone. Now...
8
by: nick | last post by:
printf("%lf",3.25); the result is 3.25000 i want the answer correct to 3 decimal places What should i do? thanks!
2
by: Scott | last post by:
I want to display a decimal as a currency value for instance £65.00 or £58.47, but at the moment the code doesn't seem to work correctly. Can I declare this variable to be shown with 2 decimal...
1
by: .Net Sports | last post by:
the below itemdatabound function works , displays all the grand totals in the footer control of the datagrid: private void dglvboard_ItemDataBound(object sender,...
5
by: =?Utf-8?B?S3VuYWwgUGF0ZWw=?= | last post by:
I have a DataTable with Column DataType as Double I just want to show data in C# datagrid with two decimal places which property do I set for DataColum of DataTable and How? Thanks
1
by: drwigginton | last post by:
I have created several bar charts in MS Access using query results to provide the data for the chart. I added data tables to the charts to show the actual values. My problem is that one of the fields...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.