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. onclick event for data grid

onclick event for data grid

Scheduled Pinned Locked Moved ASP.NET
csharpcssasp-netlearning
6 Posts 4 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.
  • P Offline
    P Offline
    ps srinivasan
    wrote on last edited by
    #1

    Hello frnd I displayed my mark list table in data grid.if i click the roll number cell i want to display the corresponding value (like name ,class) in text box,i am using asp.net 1.1.i am MCA student,beginner in asp.net,so please any one give some code or link or idea plz urgent this.

    J A 2 Replies Last reply
    0
    • P ps srinivasan

      Hello frnd I displayed my mark list table in data grid.if i click the roll number cell i want to display the corresponding value (like name ,class) in text box,i am using asp.net 1.1.i am MCA student,beginner in asp.net,so please any one give some code or link or idea plz urgent this.

      J Offline
      J Offline
      John ph
      wrote on last edited by
      #2

      Do you mean to say 'on the click of a particular record on the DataGrid you want to display the details in the TextBoxes outside the DataGrid? If yes then You can write the code on the ItemCommand event of the DataGrid which will be fired when you click on the DataGrid link.


      Life is not measured by the amount of breaths we take, but by the moments that take our breath away.


      P 1 Reply Last reply
      0
      • P ps srinivasan

        Hello frnd I displayed my mark list table in data grid.if i click the roll number cell i want to display the corresponding value (like name ,class) in text box,i am using asp.net 1.1.i am MCA student,beginner in asp.net,so please any one give some code or link or idea plz urgent this.

        A Offline
        A Offline
        ajay58886
        wrote on last edited by
        #3

        bind linkbutton with grid...on select find control....find value ...fill data according to value in dataset...pass to textbox... hope u understand..

        Impact Pro

        M 1 Reply Last reply
        0
        • J John ph

          Do you mean to say 'on the click of a particular record on the DataGrid you want to display the details in the TextBoxes outside the DataGrid? If yes then You can write the code on the ItemCommand event of the DataGrid which will be fired when you click on the DataGrid link.


          Life is not measured by the amount of breaths we take, but by the moments that take our breath away.


          P Offline
          P Offline
          ps srinivasan
          wrote on last edited by
          #4

          John Prabhu wrote:

          'on the click of a particular record on the DataGrid you want to display the details in the TextBoxes?

          Yes.

          John Prabhu wrote:

          f yes then You can write the code on the ItemCommand event of the DataGrid which will be fired

          I am fresher for asp.net plz give some sample code

          J 1 Reply Last reply
          0
          • P ps srinivasan

            John Prabhu wrote:

            'on the click of a particular record on the DataGrid you want to display the details in the TextBoxes?

            Yes.

            John Prabhu wrote:

            f yes then You can write the code on the ItemCommand event of the DataGrid which will be fired

            I am fresher for asp.net plz give some sample code

            J Offline
            J Offline
            John ph
            wrote on last edited by
            #5

            you will find hundreds of sample codes on DataGrid here... follow the LINK[^]. And the Good News is, it's available for free.

            - Regards -
               JON


            Life is not measured by the amount of breaths we take, but by the moments that take our breath away.


            1 Reply Last reply
            0
            • A ajay58886

              bind linkbutton with grid...on select find control....find value ...fill data according to value in dataset...pass to textbox... hope u understand..

              Impact Pro

              M Offline
              M Offline
              Mack Ait Aoudia
              wrote on last edited by
              #6

              hello, If the data you want to display came from a binded data source, you could put your textbox in edititemtemplate section, bind it to right item to display and make a linkbutton (or a button) as itemtemplate. When a user click the linkbutton, use edititemindex in itemcommand event to make your grid in edit mode.

              Just Relax And Keep It Simple.

              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