询问在网格视图中使用逗号分隔符 [英] Asking about using comma separator in grid view

查看:84
本文介绍了询问在网格视图中使用逗号分隔符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我!!!

我想在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 Horizo​​ntalAlign =Right />

< itemstyle horizo​​ntalalign =正确>

解决方案

试试这个,



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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆