R – Adding checkbox control in datagrid at first column (vb.net 2003)

checkboxdatagridvb.net

I am assigning a 'ds' dataset to datagrid.In addition to that I want to add new column with check boxes.That new column will be first column of datagrid.

Currently I am using below code,

DataGrid1.DataSource = dsResult.Tables("Result")

Result table has 4 column….in addtion to that i want to column "Selection" with check boxes

Best Answer

You can add a checkbox inside the itemtemplate like

<ItemTemplate>
   <asp:CheckBox ID="chkComplete" runat="server" />
</ItemTemplate>

For a basic understanding read this article

Including a CheckBox Control Inside an ASP.NET DataGrid...

Related Topic