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
MsgBox(pkey)
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
|