gridview中的列应包含2个值。 [英] columns in gridview should contain 2 values.
本文介绍了gridview中的列应包含2个值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望gridview中的列包含2个值。它可以使用模板字段在html中轻松完成,如下所示。
I want the columns in my gridview to contain 2 values. It can be done easily in html using template field as shown below.
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:TemplateField HeaderText="Root">
<ItemTemplate>
<asp:Table ID="table1" runat="server">
<asp:TableRow ID="row1">
<asp:TableCell ID="cell1" Text="abc">
</asp:TableCell>
<asp:TableCell ID="cell2" Text="def">
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
我想这样做动态的东西。请在C#asp.net上给我完整的上述代码。
I want to do this same thing dynamically. Please give me the entire code for the above thing in C# asp.net.
推荐答案
参考
在-a下显示多列-single-column-in-gridvie / [ ^ ]
动态多行列网格标题 [ ^ ]
这篇关于gridview中的列应包含2个值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文