Gridview "select button" causes weird problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hhoang.nl@gmail.com

    Gridview "select button" causes weird problems

    I have a very weird problem with the GridView control.

    Here is the code:


    <asp:GridView runat="server" ID="gv" AutoGenerateEdi tButton="true"
    AutoGenerateSel ectButton="true " AllowPaging="tr ue"
    AutoGenerateCol umns="false">
    <Columns>
    <asp:CheckBoxFi eld HeaderText="Ena bled" DataField="Enab led"
    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 AutoGenerateSel ectButton 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?
Working...