带有下拉列表的网格视图 [英] grid view with dropdown list
本文介绍了带有下拉列表的网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要一个带有下拉列表的网格视图,在下拉列表中我想要一些选项,例如2-update,4-delete,5-display,当我从下拉列表中选择任何选项时,它将在网格视图中的行上执行特定的任务.
i need a grid view with drop down list,in drop down list i want some option like 2-update,4-delete,5-display,when i select any option from drop down list it will perform particular task on row in grid view.
推荐答案
尝试以下代码:
< asp:GridView ID ="GridView1" runat =服务器" Width ="100%">
<列>< asp:TemplateField HeaderText ="HeaderText">
< HeaderStyle HorizontalAlign ="Center" Width ="5%" Font-Bold ="True"
ForeColor ="White" BorderColor ="White"
BorderStyle ="Solid" Font-Names ="Verdana"></HeaderStyle>
< itemtemplate>
< asp:DropDownList ID ="DropDownList1" runat =服务器">
< asp:ListItem>更新
< asp:ListItem>删除
< asp:ListItem>显示
try this code:
<asp:GridView ID="GridView1" runat="server" Width="100%" >
<columns><asp:TemplateField HeaderText="HeaderText">
<HeaderStyle HorizontalAlign="Center" Width="5%" Font-Bold="True"
ForeColor="White" BorderColor="White"
BorderStyle="Solid" Font-Names="Verdana" ></HeaderStyle>
<itemtemplate>
<asp:DropDownList ID="DropDownList1" runat="server" >
<asp:ListItem>Update
<asp:ListItem>delete
<asp:ListItem>Display
希望对您有帮助.
i hope it will helps you.
这篇关于带有下拉列表的网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文