如何在datagrid與repeader控件中對標(biāo)識值進(jìn)行替換?很多新手對此不是很清楚,為了幫助大家解決這個難題,下面小編將為大家詳細(xì)講解,有這方面需求的人可以來學(xué)習(xí)下,希望你能有所收獲。
DataGrid控件中替換標(biāo)識值的使用:
<asp:DataGrid ID="dgList" runat="server" Width="100%" AutoGenerateColumns="False"> <Columns> <asp:BoundColumn DataField="COP_G_NO" HeaderText="物料號/成品貨號"></asp:BoundColumn> <asp:BoundColumn DataField="QTY" HeaderText="數(shù)量"></asp:BoundColumn> <asp:TemplateColumn HeaderText="物料標(biāo)識"> <ItemTemplate> <%#GetTransType(DataBinder.Eval(Container.DataItem, "FLAG"))%> </ItemTemplate> </asp:TemplateColumn> </Columns> </asp:DataGrid> 直接調(diào)用后臺方法: <asp:TemplateColumn HeaderText="原產(chǎn)地"> <ItemTemplate> <%# (Common.Constant.CountryList.ContainsKey(Eval("COUNTRY") + "")) ? Common.Constant.CountryList[Eval("COUNTRY") + ""] : Eval("COUNTRY") + "" %> </ItemTemplate> </asp:TemplateColumn>
網(wǎng)站欄目:如何在datagrid與repeader控件中對標(biāo)識值進(jìn)行替換-創(chuàng)新互聯(lián)
網(wǎng)站網(wǎng)址:http://jinyejixie.com/article40/csppeo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供商城網(wǎng)站、微信小程序、App開發(fā)、做網(wǎng)站、外貿(mào)建站、全網(wǎng)營銷推廣
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容