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. getting row index of a table in data source

getting row index of a table in data source

Scheduled Pinned Locked Moved ASP.NET
database
7 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.
  • A Offline
    A Offline
    amarnath n n
    wrote on last edited by
    #1

    can i get rowindex of paricular row in a table

    A 1 Reply Last reply
    0
    • A amarnath n n

      can i get rowindex of paricular row in a table

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      amarnath n.n wrote:

      can i get rowindex of paricular row in a table

      which kind of table ? Are you talking about GridView or what ?

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

      A 1 Reply Last reply
      0
      • A Abhijit Jana

        amarnath n.n wrote:

        can i get rowindex of paricular row in a table

        which kind of table ? Are you talking about GridView or what ?

        Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

        A Offline
        A Offline
        amarnath n n
        wrote on last edited by
        #3

        Table in a datasource

        A 1 Reply Last reply
        0
        • A amarnath n n

          Table in a datasource

          A Offline
          A Offline
          amarnath n n
          wrote on last edited by
          #4

          sorry wrongly sent Table in a DataSet

          A 1 Reply Last reply
          0
          • A amarnath n n

            sorry wrongly sent Table in a DataSet

            A Offline
            A Offline
            Abhijit Jana
            wrote on last edited by
            #5

            amarnath n.n wrote:

            Table in a DataSet

            Yes you can. Load the DataSet Table data in DataTable. Then you can read the data from each and every row based on row index.

            DataSet Ds= LoadDataSet();
            if (Ds.Tables["Table1"].Rows.Count>0)
            {
            DataTable dtable = new DataTable();
            dtable = Ds.Tables["Table1"];
            //Read data
            string Name= dt1.Rows[0]["Name"].ToString();

            }

            This is an sample example, Hope this will help you :-D

            Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

            A 1 Reply Last reply
            0
            • A Abhijit Jana

              amarnath n.n wrote:

              Table in a DataSet

              Yes you can. Load the DataSet Table data in DataTable. Then you can read the data from each and every row based on row index.

              DataSet Ds= LoadDataSet();
              if (Ds.Tables["Table1"].Rows.Count>0)
              {
              DataTable dtable = new DataTable();
              dtable = Ds.Tables["Table1"];
              //Read data
              string Name= dt1.Rows[0]["Name"].ToString();

              }

              This is an sample example, Hope this will help you :-D

              Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

              A Offline
              A Offline
              amarnath n n
              wrote on last edited by
              #6

              Not like this i want to get the rowindex of particular row.see the code which i am trying to do that DataRow[] row =dsphotos.Tables[0].Select("PHOTO_ID",Session["ID"].ToString()); int rowindex= dsphotos.Tables[0].Rows.IndexOf(row[0]);

              A 1 Reply Last reply
              0
              • A amarnath n n

                Not like this i want to get the rowindex of particular row.see the code which i am trying to do that DataRow[] row =dsphotos.Tables[0].Select("PHOTO_ID",Session["ID"].ToString()); int rowindex= dsphotos.Tables[0].Rows.IndexOf(row[0]);

                A Offline
                A Offline
                Arindam Sinha
                wrote on last edited by
                #7

                So what's your question? You are fine with your implementation or you want something else.:confused:

                Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.

                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