Hi,
You need to change the NumberGroupSeparator so it doesn't use "," but uses
".". That's in the System.Globalization namespace. You'll probably need a
helper function to do the work. See the example code below.
I've used a Long in the sample because it seems to be the same as a SQL
bigint.
Let us know if this helps?
Ken
Microsoft MVP [ASP.NET]
Toronto
<%@ Page Language="VB" %>
<script runat="server">
sub Page_Load
if not ispostback then
datagrid1.datasource=CreateDataSource()
datagrid1.databind
end if
end sub
Function Fixbigint(lng as long) as string
Dim nfi As System.Globalization.NumberFormatInfo = _
New System.Globalization.CultureInfo _
("en-US", False).NumberFormat
' lng=9223372036854775807
nfi.NumberGroupSeparator ="."
return lng.ToString("N", nfi)
end function
Function CreateDataSource() As system.data.DataTable
Dim dt As New system.data.DataTable
Dim dr As system.data.DataRow
dt.Columns.Add(New system.data.DataColumn _
("id", GetType(Int32)))
dt.Columns.Add(New system.data.DataColumn _
("itemdesc", GetType(String)))
dt.Columns.Add(New system.data.DataColumn _
("along", GetType(Long)))
dt.Columns.Add(New system.data.DataColumn _
("Boolean", GetType(Boolean)))
Dim i As Integer
For i = 0 To 8
dr = dt.NewRow()
dr(0) = i
dr(1) = "Item " + i.ToString()
dr(2) = 92233720368547758 + i
dr(3) = (i = 4)
dt.Rows.Add(dr)
Next i
Return dt
End Function 'CreateDataSource
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<p>
<asp:Label id="Label1" runat="server"></asp:Label>
</p>
<p>
</p>
<p>
<asp
ataGrid id="DataGrid1" runat="server"
AutoGenerateColumns="False">
<Columns>
<asp:TemplateColumn HeaderText="along">
<ItemTemplate>
<asp:Label runat="server" text='<%#
Fixbigint(DataBinder.Eval(Container, "DataItem.along")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp
ataGrid>
</p>
</form>
</body>
</html>