473,378 Members | 1,470 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,378 software developers and data experts.

Displaying of decimal places in gridview of .NET forms

How to disply decimal part in the grid view of .Net forms ?

Example

Field Name : ITEM RATE NUMBER(11,4) (ORACLE DATABSE)

OUTPUT[ TO BE DISPLAYED AS

1.09 1.0900

1.9 1.9000

1.999 1.9900

1 1.0000

Thanks
C.ADITYA KUMAR NAIDU
Nov 6 '08 #1
1 2564
tlhintoq
3,525 Expert 2GB
Example:
Expand|Select|Wrap|Line Numbers
  1. String.Format("{0:0.00}", 123.4567);      // "123.46"
So if you want 4 digits to the right of the decimal use a format string of "0:0.0000"
Nov 7 '08 #2

Sign in to post your reply or Sign up for a free account.

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...
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!
1
by: Les Hughes | last post by:
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...
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...
3
by: RG | last post by:
I am reading in from a serial port a 16 bit number from 0 to 65536. It is being read as a string from my microcontroller into VB using DEC5 or 5 digits are displayed. I need to display this value...
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: 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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.