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. Java script for gridview

Java script for gridview

Scheduled Pinned Locked Moved ASP.NET
questionjavatools
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.
  • B Offline
    B Offline
    byka
    wrote on last edited by
    #1

    I have gridview with 3 check (checkBox1,checkBox2,checkBox3). When user check checkBox3 -> checkBox1,checkBox2 should be enable ane opposite when user un-check checkBox3 ->checkBox1,checkBox2 should be disable. how can I do this?

    M T 2 Replies Last reply
    0
    • B byka

      I have gridview with 3 check (checkBox1,checkBox2,checkBox3). When user check checkBox3 -> checkBox1,checkBox2 should be enable ane opposite when user un-check checkBox3 ->checkBox1,checkBox2 should be disable. how can I do this?

      M Offline
      M Offline
      Morgs Morgan
      wrote on last edited by
      #2

      jQuery way: Pass the checkBoxes objects to this function please, e.g.

      //
      function OnSelect( checkBox3, checkBox1, checkBox2 )
      {
      if( checkBox3.is( ':selected' ) )
      {
      checkBox1.attr( 'disabled', false );
      checkBox2.attr( 'disabled', false );
      }
      else
      {
      checkBox1.attr( 'disabled', true);
      checkBox2.attr( 'disabled', true);
      }
      }

      Happy coding, Morgs

      1 Reply Last reply
      0
      • B byka

        I have gridview with 3 check (checkBox1,checkBox2,checkBox3). When user check checkBox3 -> checkBox1,checkBox2 should be enable ane opposite when user un-check checkBox3 ->checkBox1,checkBox2 should be disable. how can I do this?

        T Offline
        T Offline
        thatraja
        wrote on last edited by
        #3

        You didn't even share the code then how can we give you solution? Refer the below article Selecting / Deselecting all the CheckBoxes Inside a GridView[^]

        thatraja


        My Dad had a Heart Attack on this day so don't...
        Pompeyboy3 here
        | Nobody remains a virgin, Life screws everyone :sigh:

        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