AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 GridView
Posted by Jayrawat on  3/8/2010 10:33:40 PM Category: Asp.Net 2.0
Add to my favorites
Email to friend
how will Perform Add Delete update on Gridview Controle Through
Checkbox..

Post Your Reply Post New Question

 Viewer's Reply
Delete using CheckBox in GridView Control
Answered By Moderator1 on 3/12/2010 12:35:44 AM
Hi,

For Basic GridView Data Manipulation, read the article in the below url.
http://www.aspdotnetcodes.com/Simple_Insert_Update_Delete_GridView_Sample.aspx.

To add checkbox, add a template field column in the GridView and place the checkbox. You need to place a Button outside the Gridview, in the Click event, you need to check whether CheckBox for the row is checked or not using the below code,

foreach (GridViewRow gvrow in GridView1.Rows)
{
CheckBox CheckBox1 = (CheckBox)gvrow.FindControl("CheckBox1");
if (CheckBox1.Checked)
{
//Do your operations here.
}
}
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
Windows 8: 50 Questions and Answers You Need to Make a Decision (Normally $9.95)
Take Advantage of Oracle's 2 Day DBA Course
Introduction to Software Development