Check Box !

A

Adam Knight

Hi all,

I have a checked box in a datagrid like so:

<asp:TemplateColumn>
<ItemStyle HorizontalAlign="Right" Width="25px"></ItemStyle>
<ItemTemplate>
<asp:CheckBox ID="chkAddDocument"
OnCheckedChanged="chkAddDocument_CheckedChanged" AutoPostBack="True"
Runat="server" />
</ItemTemplate>
</asp:TemplateColumn>

The associated sub is defined like so:

Public Sub chkAddDocument_CheckedChanged(ByVal sender As Object, ByVal e As
System.EventArgs)
Response.Write("Checked!")
End Sub

Unfortunately my problem is, the Sub doesn't seems to be called when i
change the checked value of a given CheckBox...????
Any thoughts??

Cheers,
Adam
 
S

Satguru.Saran

Hi Adam,

I suggest u try adding the event on the rowdatabound event of the grid
by using findcontrol method
I believe this wiil work


Satguru
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top