开发者

Adding check box to grid view for each row

I am filling a GridView with the data table but on each 开发者_运维问答row I want a check box how can I achieve this?


<Columns>
<asp:TemplateField HeaderText="Select" HeaderStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" Checked="false" />
</ItemTemplate>
</asp:TemplateField>

Use this, you will find what you want!


You could use a < asp:TemplateColumn > or, depending on your desired functionality, opt for a repeater control instead.


Right click the grid view and add a template column. Inside that column, you are able to put whatever you want - including a checkbox.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜