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 use data grid in asp.net

how to use data grid in asp.net

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

    If i click the datagrid i want the corresponding data to be displayed in a text box?

    M 1 Reply Last reply
    0
    • P ps srinivasan

      If i click the datagrid i want the corresponding data to be displayed in a text box?

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      ps.srinivasan wrote:

      If i click the datagrid

      Which part of datagrid do you want to click? header or cell or footer or border or something?? It would be great if you can tell us more details and specific about what you really want. then, it is more easier for us to help you. srinivasan

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

      P 1 Reply Last reply
      0
      • M Michael Sync

        ps.srinivasan wrote:

        If i click the datagrid

        Which part of datagrid do you want to click? header or cell or footer or border or something?? It would be great if you can tell us more details and specific about what you really want. then, it is more easier for us to help you. srinivasan

        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

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

        thank u for reply I want to retrive cell Value

        N 1 Reply Last reply
        0
        • P ps srinivasan

          thank u for reply I want to retrive cell Value

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          DataGrid will be rendered as HTML table. On ItemDatbound event, get the cell text and make a call to a javascript function on the OnClick event of the cell.

          e.Item.Cells[0].Text = "<a onclick="YourJsFunction('" + e.Item.Cells[0].Text

          • "')>" + e.Item.Cells[0].Text + "</a>

          above code will set the OnClick event for first cell. Cell value will be passed as parameter to the JS function which can be assigned to text box. Hope it helps

          All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

          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