开发者

How to add checkbox control at the Header of DatagridviewCheckBoxColumn?

开发者 https://www.devze.com 2023-03-11 20:53 出处:网络
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

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

精彩评论

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