开发者

How to add checkbox control at the Header of DatagridviewCheckBoxColumn?

Can anyone please provide the C# coding to add checkbox control at the Header of DatagridviewCh开发者_Go百科eckBoxColumn.


Convert the Check Box Column to a template field. Then add the Check box to the header template.


I think WarithNath is right. Here is a suggestion code.

<asp:TemplateField>
   <EditItemTemplate>
        <asp:CheckBox ID="CheckBox1" runat="server" />
   </EditItemTemplate>
   <ItemTemplate>
        <asp:CheckBox ID="CheckBox1" runat="server" />
   </ItemTemplate>
   <HeaderTemplate>
       <asp:CheckBox ID="CheckBoxToSelectAll" runat="server" />
   </HeaderTemplate>

</asp:TemplateField>

Hope it works!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜