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?
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?