Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > Components & Controls > Grids > Web Grids

Web Grids Discussion related to any grid for ASP.NET

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-30-2008, 2:51 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Nov 2008
Location: Singapore
Posts: 18
Reputation: 18
reubenfoo is on a distinguished programming path ahead
Default CheckBox Template field

Hi All,

may i know how do i find the value of the CheckBox template field in a gridview.

The user would select the information they want and those un-checked would be deleted. When the button is pressed, the information on the next page would only show the selected records. Anyone has the VB coding for this? thanks

- the template is called - CheckBox1


attached is the gridview screen shot.
Attached Images
File Type: jpg checkbox.jpg (114.3 KB, 9 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-06-2009, 12:22 PM
VB.NET Forum Idol
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Feb 2008
Location: USA
Posts: 874
Reputation: 499
MattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond repute
Default

Loop through the rows

Code:
For Each row as GridViewRow In GridView1.Rows
Find the checkbox in the row

Code:
Dim cbx As CheckBox = GridView1.FindControl("CheckBox1")
Check if the CheckBox is checked and then do something with it.

Code:
If cbx.Checked Then...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 3:09 AM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.