Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Checkbox in Datagrid doesn't fire event

Reply
Thread Tools

Checkbox in Datagrid doesn't fire event

 
 
Paul D. Fox
Guest
Posts: n/a
 
      04-28-2005
I've added a Checkbox control to a Datagrid and would like to Enable/Disable a button based on whether the checkbox is checked. However, I'm trying to use the "OnCheckChanged" event which doesn't seem to fire. Any ideas as to how to get this to work?

<HeaderTemplate>
<asp:CheckBox id="CheckAll" OnCheckedChanged="SelectedCheckBox_OnCheckedChange d" AutoPostBack=True runat="server" />
</HeaderTemplate>

Code Behind:
Protected Sub SelectedCheckBox_OnCheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim ck1 As CheckBox = CType(sender, CheckBox)
Dim fChecked As Boolean = ck1.Checked

If fChecked Then
btnCTSSignTimesheet.Enabled = True
Else
btnCTSSignTimesheet.Enabled = False
End If
End Sub

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ImageButton event doesn't fire but Button event does suzanne.boyle@gmail.com ASP .Net 4 06-13-2007 09:19 PM
DataGrid and embeded Checkbox..How to find if checkbox clicked =?Utf-8?B?RG90TmV0RGV2?= ASP .Net 1 10-06-2006 04:11 PM
Fire up checkbox onclick event from asp.net codebehind ccordero@gmx.net ASP .Net 3 09-29-2006 09:29 PM
Fire up checkbox onclick event from asp.net codebehind ccordero@gmx.net Javascript 3 09-29-2006 09:29 PM
Howto bind CheckBox to the datagrid/ Then update the database field when the checkbox is clicked. Joey Pang ASP .Net Datagrid Control 4 06-13-2005 02:29 AM



Advertisments