Gridview "select button" causes weird problems

H

hhoang.nl

I have a very weird problem with the GridView control.

Here is the code:


<asp:GridView runat="server" ID="gv" AutoGenerateEditButton="true"
AutoGenerateSelectButton="true" AllowPaging="true"
AutoGenerateColumns="false">
<Columns>
<asp:CheckBoxField HeaderText="Enabled" DataField="Enabled"
SortExpression="Enabled" />
</Columns>
</asp:GridView>


Looks simple enough, huh? When I go into edit mode I check the
checkbox (which initially is unchecked) and then hit the "Update"
link. When I try to read the checkbox property "Checked", it returns
the value False.
Isn't this pretty weird behaviour?

When I set AutoGenerateSelectButton to "false", then everything works
as it should be. I just don't understand why it fails when I set it to
True.

Can anyone enlighten me?
 

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,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top