Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to get checkbox checked in a grid view after page post

how to get checkbox checked in a grid view after page post

Scheduled Pinned Locked Moved ASP.NET
databasecsshelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    santu321
    wrote on last edited by
    #1

    In my application.I have used a gridview and in the header of a particular column of that gridview I have used checkbox.In the checkchanged event of the checkbox some database query executes.It is working but the problem is after the page post the checkbox gets unchecked.But I want that the checkbox remain checked.How can it be achieved.

    A 1 Reply Last reply
    0
    • S santu321

      In my application.I have used a gridview and in the header of a particular column of that gridview I have used checkbox.In the checkchanged event of the checkbox some database query executes.It is working but the problem is after the page post the checkbox gets unchecked.But I want that the checkbox remain checked.How can it be achieved.

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      Are you re-initializing the checkbox when page is posted back... You should block the initialization inside if(!IsPostBack) block . :)

      Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


      My Latest Articles-->** Microsoft Bing MAP using Javascript
      CLR objects in SQL Server 2005
      Uncommon C# Keywords
      /xml>

      S 1 Reply Last reply
      0
      • A Abhishek Sur

        Are you re-initializing the checkbox when page is posted back... You should block the initialization inside if(!IsPostBack) block . :)

        Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


        My Latest Articles-->** Microsoft Bing MAP using Javascript
        CLR objects in SQL Server 2005
        Uncommon C# Keywords
        /xml>

        S Offline
        S Offline
        souravghosh18
        wrote on last edited by
        #3

        No i am not initialising it. And i am also forcefully checked the checkbox before databind method.But still it is not working.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups