Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Adding Check box to Data Grid

Author  Topic 

kris22
Starting Member

35 Posts

Posted - 2008-11-12 : 18:42:08
Hi,
i want to add a check box to datagrid for each row. how do i do that?
I want to delete the rows in the datagrid based on the check box selection. Can you guys help me with any code samples? appreciate it
I am using VS.NET2003, VB.NET/ASP.NET
Thx

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2008-11-12 : 20:25:32
I copied the phrase "add a check box to datagrid for each row" directly from your post, and popped it into Google, and got lots of examples:

http://www.google.com/search?q=add+a+check+box+to+datagrid+for+each+row



- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-11-13 : 03:04:55
Very simple,
set the property of your grid view AutoGenerateColumns="False"

then create your template fields and add this.



<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="checkbox" runat=server />
</ItemTemplate>
</asp:TemplateField>
Go to Top of Page
   

- Advertisement -