Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 22nd, 2006, 03:05 PM
Registered User
Join Date: Nov 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default delete using checkboxes in gridview

hey everyone

im having problems with a few things
im using a gridview to display my data from my access database using an accessdatasource. i have set the auto generated column to false and i have bounded all my columns to correspoings fields. i have also added a checkbox to the gridview as another column as a template field
oncheckedchanged im calling a subroutine which takes the index of the gridviewrow and display it in a messagebox. this was just to test whether it gives me the primary key value but it keeps giving me -1
on any checkbox i check. i hear something about binding the data to the checkbox but im not too familiar with all this as i have only been working on this for a while. any help is very much appreciated

Sub CheckBox1_CheckedChanged1(ByVal sender As Object, ByVal e As EventArgs)

      Dim pkey As String = GridView1.SelectedIndex

End Sub

once i know that every checkbox is uniquely binded by the primary key then i can delete it but i might also need help on that. thanks

Reply With Quote
  #2 (permalink)  
Old November 22nd, 2006, 08:28 PM
Friend of Wrox
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Checkboxes in Gridview ramuis78 ASP.NET 2.0 Basics 0 October 11th, 2007 09:55 AM
Gridview with checkboxes kgaughan1 ASP.NET 2.0 Professional 0 February 11th, 2007 11:31 PM
The use of checkboxes to delete records inoracle9i luisbueno Classic ASP Databases 0 December 24th, 2004 12:07 PM
Cannot get multiple delete using checkboxes workin gmizzell Classic ASP Databases 0 July 13th, 2003 04:22 PM

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

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.