Cannot capture a checkbox value in the DataGrid

P

Petr Shekhtmeyster

Hello everyone,

I have a DataGrid with the checkbox in the TemplateColumn:

<asp:TemplateColumn>
<ItemTemplate>
<asp:CheckBox ID="chkCompleted" Runat=server
Checked='<%#DataBinder.Eval(Container.DataItem,"completed")%>'
AutoPostBack="true" OnCheckedChanged="CompleteEvent"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>

And in the code-behind I have a procedure:

Public Sub CompleteEvent(ByVal sender As System.Object, ByVal e As
System.EventArgs)
'some code
End Sub

But the postback is never run the procedure.

Am I doing something wrong?

Thanks in advance,

Petr
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top