HighTechTalks DotNet Forums  

Point Data formatting problem

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss Point Data formatting problem in the ASP.net Data Grid Control forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Joe Stateson
 
Posts: n/a

Default Point Data formatting problem - 11-07-2007 , 04:26 PM






We are using PostgreSQL "point data" for a coordinate system (ie: latitude
longitude). Browsing a location table using phpPgAdmin shows for example

(29.451972,-98.748106) this is what we want.

My web app uses a Microsoft GridView and the corresponding point shows up
in the grid column as

(29.451972000000001,-98.748106000000007)

I cannot seem to round the values down and have been guessing at the format
specifier after reading this:
http://msdn2.microsoft.com/en-us/net.../aa569608.aspx

"{0:{{0.000000}}}"
had no effect: it was no different than if it was not coded up.

"{0:{{0.000000}}} {1:{{0.000000}}}"
gave an error that two values were expected but only one supplied.


I tried various combinations before giving up. I do not know how to format
the output (using the built in item format) so that the grid shows a pair of
values to only 6 places each. It seems I will have to format my own output
string and substitute it at RowDataBound time. The above format strings
work OK for fields with just single floats.


--
================================================== ====================
Joseph "Beemer Biker" Stateson
http://ResearchRiders.org Ask about my 99'R1100RT
================================================== ====================








Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.