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. Accessing datagrid _RowID

Accessing datagrid _RowID

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netalgorithmshelp
4 Posts 2 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.
  • C Offline
    C Offline
    CARisk3
    wrote on last edited by
    #1

    Can anyone tell me how to access the Datagrid _RowID? I'm using vb.net 2003(yes I know this is older technology. X| When I get this project done we are upgrading to 2008. :-D ) This is on an asp.net datagrid on an aspx form - not a windows form. Is there a way to get this information? I can see the _RowID in the watch window but I don't know how to access it from code. I have tried searching on Google and I have found nothing that explains how to do it in 2003. I don't want to limit the datagrid. I just want to jump to the page the record is on and highlight it. Thanks in advance for any help, it is greatly appreciated. :) Carolyn

    If you can’t have fun at work, then why go to work?

    A 1 Reply Last reply
    0
    • C CARisk3

      Can anyone tell me how to access the Datagrid _RowID? I'm using vb.net 2003(yes I know this is older technology. X| When I get this project done we are upgrading to 2008. :-D ) This is on an asp.net datagrid on an aspx form - not a windows form. Is there a way to get this information? I can see the _RowID in the watch window but I don't know how to access it from code. I have tried searching on Google and I have found nothing that explains how to do it in 2003. I don't want to limit the datagrid. I just want to jump to the page the record is on and highlight it. Thanks in advance for any help, it is greatly appreciated. :) Carolyn

      If you can’t have fun at work, then why go to work?

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

      Did you see this ? http://blog.krisvandermast.com/AutonumberingASPNETGridControls.aspx[^] I think you might also use

      asp:TemplateField
      <ItemTemplate>
      <%# Container.DataItemIndex + 1 %>
      </ItemTemplate>
      </asp:TemplateField>

      to get the Item index.... :-D

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


      My Latest Articles-->** Simplify Code Using NDepend
      Basics of Bing Search API using .NET
      Microsoft Bing MAP using Javascript

      C 1 Reply Last reply
      0
      • A Abhishek Sur

        Did you see this ? http://blog.krisvandermast.com/AutonumberingASPNETGridControls.aspx[^] I think you might also use

        asp:TemplateField
        <ItemTemplate>
        <%# Container.DataItemIndex + 1 %>
        </ItemTemplate>
        </asp:TemplateField>

        to get the Item index.... :-D

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


        My Latest Articles-->** Simplify Code Using NDepend
        Basics of Bing Search API using .NET
        Microsoft Bing MAP using Javascript

        C Offline
        C Offline
        CARisk3
        wrote on last edited by
        #3

        I'll take a look at that. I ended up looping through the dataset and counting the number of records until I matched by record id and then sent that information to the function needing it. It seems to work but I thought there would be an easier way to access the datagrid _rowid. Thank you for the information. :) Carolyn

        If you can’t have fun at work, then why go to work?

        A 1 Reply Last reply
        0
        • C CARisk3

          I'll take a look at that. I ended up looping through the dataset and counting the number of records until I matched by record id and then sent that information to the function needing it. It seems to work but I thought there would be an easier way to access the datagrid _rowid. Thank you for the information. :) Carolyn

          If you can’t have fun at work, then why go to work?

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

          But why? I am unsure about .NET 1.1 as it is very old tech.... But doesnt Container.DataItemIndex work ? :)

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


          My Latest Articles-->** Simplify Code Using NDepend
          Basics of Bing Search API using .NET
          Microsoft Bing MAP using Javascript

          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