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. Datagrid Problem

Datagrid Problem

Scheduled Pinned Locked Moved ASP.NET
csharpcssasp-nethelpquestion
4 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.
  • M Offline
    M Offline
    monika_vasvani
    wrote on last edited by
    #1

    HI All I have one problem Pls give me ans becoz its very important i coudn't be able to solve. I have one datagrid in asp.net.I add one buttoncolumn in first column of grid.Butoon Command name is Edit. As per my requirement button text is changed. I got text of button which i clicked. But i want text of another button which is not clicked. Is it possible? pls reply me Thanks monika

    P S N 3 Replies Last reply
    0
    • M monika_vasvani

      HI All I have one problem Pls give me ans becoz its very important i coudn't be able to solve. I have one datagrid in asp.net.I add one buttoncolumn in first column of grid.Butoon Command name is Edit. As per my requirement button text is changed. I got text of button which i clicked. But i want text of another button which is not clicked. Is it possible? pls reply me Thanks monika

      S Offline
      S Offline
      sanjivji
      wrote on last edited by
      #2

      Hi Monika, Well as from ur wordings it seems that u want to fetch text of other button . first let me clear is it some order of button which text ur looking if it is u can have the option .just add one more cmdbutton in dg and make its visibility false and give it caption with a number wise field. u can fetch its value with other command name or u have findcontrol hope it can make u some help.

      1 Reply Last reply
      0
      • M monika_vasvani

        HI All I have one problem Pls give me ans becoz its very important i coudn't be able to solve. I have one datagrid in asp.net.I add one buttoncolumn in first column of grid.Butoon Command name is Edit. As per my requirement button text is changed. I got text of button which i clicked. But i want text of another button which is not clicked. Is it possible? pls reply me Thanks monika

        P Offline
        P Offline
        Paddy Boyd
        wrote on last edited by
        #3

        Really not sure what you mean, but you can loop through all the rows in the datagrid in the server code and access whatever button you want?

        1 Reply Last reply
        0
        • M monika_vasvani

          HI All I have one problem Pls give me ans becoz its very important i coudn't be able to solve. I have one datagrid in asp.net.I add one buttoncolumn in first column of grid.Butoon Command name is Edit. As per my requirement button text is changed. I got text of button which i clicked. But i want text of another button which is not clicked. Is it possible? pls reply me Thanks monika

          N Offline
          N Offline
          nivasinfotech
          wrote on last edited by
          #4

          we can access any button in datagrid by using this code . you have to write this code if u want first row ,specify '0' in Items[0] Instead of zero u can specify any row number Button btn = (Button) datagridname.Items[0].FindControl("buttonname"); you can get the button text by using " btn.Text ". Response.Write(btn.Text);

          srinivas

          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