You have to use the OnCheckChanged Event of the checkbox.
In the source of that event you state:
CheckBox cb = (CheckBox)sender;
GridViewRow row =(GridViewRow)cb.NamingContainer;
In that case you kno in which row the checkbox was check3ed. You now know checkbox and teh row, so if you set the selectedindex to that row (row.RowIndex) and you use the DataNames in the gridview settings, you know what to update in your database