询问在网格视图中使用逗号分隔符 [英] Asking about using comma separator in grid view
问题描述
请帮助我!!!
我想在asp.net网格gridview中使用逗号分隔符显示金额.........
喜欢这个12,345,678.87和我的网格视图数据绑定在下面........
< asp:GridView ID =GridView1runat =serverAutoGenerateColumns =False
CellPadding =4ForeColor =#333333GridLines =无DataKeyNames =TheatreClassTypeID
ShowFooter =TrueWidth =100%AllowPaging =True
onrowcommand =GridView1_RowCommand
onrowdatabound =GridView1_RowDataBound
onpageindexchanging =GridView1_PageIndexChanging
>
< rowstyle backcolor =#F7F6F3forecolor = #333333>
< columns>
< asp:BoundField DataField =AmountHeaderText =AmountSortExpression =AmountReadOnly =true>
< HeaderStyle HorizontalAlign =Right />
< itemstyle horizontalalign =正确>
试试这个,
http://stackoverflow.com/questions/15344456/how-do-i-format-numerical-data-as-thousands-in-a-gridview-column-itemtemplate [<一个href =http://stackoverflow.com/questions/15344456/how-do-i-format-numerical-data-as-thousands-in-a-gridview-column-itemtemplatetarget =_ blanktitle =New窗口> ^ ]
plz help me!!!
I want to show amount by using comma separator in asp.net grid gridview.........
like this 12,345,678.87 and my grid view data binding is below........
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333" GridLines="None" DataKeyNames="TheatreClassTypeID"
ShowFooter="True" Width="100%" AllowPaging="True"
onrowcommand="GridView1_RowCommand"
onrowdatabound="GridView1_RowDataBound"
onpageindexchanging="GridView1_PageIndexChanging"
>
<rowstyle backcolor="#F7F6F3" forecolor="#333333">
<columns>
<asp:BoundField DataField="Amount" HeaderText="Amount" SortExpression="Amount" ReadOnly="true">
<HeaderStyle HorizontalAlign="Right" />
<itemstyle horizontalalign="Right">
try this,
http://stackoverflow.com/questions/15344456/how-do-i-format-numerical-data-as-thousands-in-a-gridview-column-itemtemplate[^]
这篇关于询问在网格视图中使用逗号分隔符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!