Wrox Programmer Forums
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 27th, 2006, 08:03 AM
Authorized User
 
Join Date: Dec 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datagrid

I have a database field called Rate it contains decimal values eg 0.1020, 0.1000. When I like this to my datagrid and load the datagrid the column containing the Rate has 0.0000, 0.0000 and not the values in the database.

How can i get these values in my datagrid.
Note: All other data from the database - table are correct and exact in my datagrid except the decimal values i have mentioned above.

 
Old December 27th, 2006, 08:36 AM
Registered User
 
Join Date: Sep 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to fadyratl
Default

You may want to use the FormatNumber method in this manner:
FormatNumber(X,1)
where 1, contributes to the number of digits after the comma.

 
Old October 18th, 2007, 07:43 AM
Authorized User
 
Join Date: Oct 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use round function in sql query.

like round(rate,2)

try this
let's know is it working or not.


With thanks
rajesh,
India





Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom paging in Datagrid with datagrid page count madhusrp ASP.NET 1.0 and 1.1 Professional 12 June 2nd, 2008 01:15 PM
User COntrol Datagrid inside datagrid rodmcleay ASP.NET 1.0 and 1.1 Professional 3 April 14th, 2007 10:11 AM
Creating DataGrid In Repeater/DataGrid liduwan ASP.NET 1.0 and 1.1 Professional 9 March 6th, 2007 03:31 PM
datagrid ajaidass ADO.NET 2 March 1st, 2007 05:36 PM
Need help regarding datagrid ngsharmila .NET Framework 1.x 1 February 1st, 2006 12:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.