Checkbox unchecked on clickevent in GridView

Discussion in 'ASP .Net' started by Jayender, Aug 9, 2006.

  1. Jayender

    Jayender Guest

    Hi ,
    I have placed checkbox in my gridview ..
    now when i check the chekbox and click anybutton the checkbox becomes
    unchecked.

    but when i normally add checkbox in the page it doesnt happen but it
    happens when i add it to the gridview.
    why is that ? i have added checkbox like this in my gridview:

    .......
    <ItemTemplate>
    <asp:CheckBox runat="server" ID="CheckBox" />
    </ItemTemplate>
    .....
    what could be the reason...

    waiting for ur reply...
    Ciao,
    Jay
     
    Jayender, Aug 9, 2006
    #1
    1. Advertising

  2. Jayender

    Jayender Guest

    RESOLVED

    I have to give the code in :
    if (!IsPostBack)

    thats it.. it works fine...


    Jayender wrote:
    > Hi ,
    > I have placed checkbox in my gridview ..
    > now when i check the chekbox and click anybutton the checkbox becomes
    > unchecked.
    >
    > but when i normally add checkbox in the page it doesnt happen but it
    > happens when i add it to the gridview.
    > why is that ? i have added checkbox like this in my gridview:
    >
    > ......
    > <ItemTemplate>
    > <asp:CheckBox runat="server" ID="CheckBox" />
    > </ItemTemplate>
    > ....
    > what could be the reason...
    >
    > waiting for ur reply...
    > Ciao,
    > Jay
     
    Jayender, Aug 9, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Javier
    Replies:
    2
    Views:
    4,129
    Javier
    Dec 12, 2005
  2. Kodara
    Replies:
    0
    Views:
    790
    Kodara
    Jul 16, 2008
  3. RVic
    Replies:
    19
    Views:
    1,451
  4. MA

    Clickevent in datacell

    MA, Aug 16, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    156
  5. Helmut

    Problem with ClickEvent

    Helmut, Aug 25, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    150
    Tonix
    Aug 26, 2004
Loading...

Share This Page