【发布时间】:2012-06-14 12:05:07
【问题描述】:
我在 DataGrid 中有以下字段
4 绑定归档, 1 下拉菜单, 3 按钮现在我想在一行中显示绑定字段,在第二行中显示下拉菜单和按钮。 由于某些原因,我只能使用 Datagrid。我不能使用任何其他控件。
那么我怎样才能在两行中显示数据呢?
我的代码如下:
<asp:BoundColumn DataField="Market"> </asp:BoundColumn>
<asp:BoundColumn DataField="DrawPrice" H> </asp:BoundColumn>
<asp:BoundColumn DataField="Name2"> </asp:BoundColumn>
<asp:BoundColumn DataField="AwayPrice"> </asp:BoundColumn>
<asp:TemplateColumn>
<ItemTemplate>
<asp:DropDownList ID="DropDownList1" runat="server"></asp:DropDownList>
<asp:LinkButton ID="btn1" runat="server" CommandName="btn1"/>
<asp:LinkButton ID="btn2" runat="server" CommandName="btn2"/>
<asp:LinkButton ID="btn3" runat="server" CommandName="btn3"/>
</ItemTemplate>
</asp:TemplateColumn>
【问题讨论】:
-
你到底是在用老
DataGrid,还是在用GridView?