0

Is there anyway I can my checkbox fill the whole field in ASP.net gridview ?

enter image description here

It is going to look something like this

enter image description here

here is my grid

<asp:GridView ID="grdTags" runat="server" AutoGenerateColumns="false"  AllowPaging="false" AllowSorting="True" 
DataSourceID="dsTagsDetailsSelect" >

<Columns>

<asp:CommandField HeaderText="" SelectText="Select" ShowSelectButton="True" ControlStyle-Font-Size="Small">
<HeaderStyle BackColor="Gainsboro" />
</asp:CommandField>

<asp:TemplateField HeaderText="Add" SortExpression="Added">
<HeaderStyle BackColor="Gainsboro" />
<ItemTemplate>
<asp:CheckBox runat="server" ID="cbxAdd"
Checked='<%# Eval("Added").ToString()=="1"?true:false  %>' AutoPostBack="true"
OnCheckedChanged="cbxAdd_CheckedChanged" />

</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />

</asp:TemplateField>

<asp:BoundField DataField="Occurrence" HeaderText="Count" ReadOnly="True" SortExpression="Occurrence">
<HeaderStyle BackColor="Gainsboro" />
<ItemStyle HorizontalAlign="Center" />

</asp:BoundField>
asmgx
  • 7,328
  • 15
  • 82
  • 143

0 Answers0