Last post Dec 16, 2011 09:51 AM by kuber.manral
Nov 06, 2006 03:59 AM|PitchBlack_|LINK
I have tried several approaches from getting a checkbox in my gridview (in a template field) to fire the 'CheckedChanged' event. Even creating a custom control derived from the
System.Web.UI.WebControls.Checkbox didn't do the trick... Let me describe my problem: I have a GridView with a dataset as datasource. The dataset gets it's data out of multiple tables from a MSSQL database. Both the field "UserId" from table
"aspnet_Users" and the field "UserId" from table "UsersInProjects" are being selected.(left outer join) Instead of showing these two ID's in the grid I would like to have a checkbox instead, checked when the UserId field in UsersInProjects isn't empty, meaning
that the user is subscribed to the project. When this checkbox fires the CheckedChanged event I would like to INSERT (checked) or DELETE (unchecked) the user from the UsersInProjects table.
I hope I explained properly.
GridView Checkbox CheckedChanged
Nov 06, 2006 04:56 AM|azamsharp|LINK
Check out this article:
Nov 07, 2006 01:22 AM|PitchBlack_|LINK
Thanks for your reply,
I had allready read your article and found it most helpful. There were different reasons why I didn't work but I figured them out now.
Feb 02, 2007 10:11 AM|blishek|LINK
Feb 02, 2007 10:22 PM|azamsharp|LINK
Take a look at the following post:
Feb 03, 2007 04:36 PM|blishek|LINK
Dec 16, 2011 09:44 AM|jugnu prakash|LINK
Dec 16, 2011 09:51 AM|kuber.manral|LINK
First of all check you are using IsPostBack Property like :
Second, Please provide your RowCommand And RowDataBound event COde here for Gridview,
inside which you have rendered CheckBox Control.