Exponential Value problem

Results 1 to 2 of 2

Thread: Exponential Value problem

  1. #1
    Join Date
    Dec 1969

    Default Exponential Value problem

    Hello,<BR><BR>I am binding data from SQLServer. The datatype in SqlServer is decimal. When the data appears on the datagrid, it is displayed in an exponential form, How can I display the actual data<BR><BR>PS: I tried Convert.ToDecimal(....), but to no avail

  2. #2
    Join Date
    Dec 1969

    Default RE: Exponential Value problem

    Set the BoundColumn&#039;s DataFormatString to:<BR><BR>{0:f10}<BR><BR>You can change the number following f to specify the precise number of decimal places to show.<BR><BR>For example, your BoundColumn would be defined as:<BR><BR>&#060;asp:BoundColumn DataField="columnName" DataFormatString="{0:f10}" /&#062;<BR><BR>If you need to alter the format in a TemplateColumn or in the source code portion of the page, you can use the String.Format() method like so:<BR><BR>String.Format("{0:f10}", dataToFormat)<BR><BR>hth

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts