Results 1 to 2 of 2

Thread: index of a datarow in a datatable

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Posts
    19

    Unhappy index of a datarow in a datatable

    Pls Help
    How to find index of a datarow in a datatable?

    My Code is
    Code:
    ]
    dtr.PrimaryKey= new DataColumn[] { dtr.Columns["Company_cd"] };
          String a = Convert.ToString(Session["CompanyID"]);
          dr = dtr.Rows.Find(Convert.ToString(Session["CompanyID"]));
          Position=dr.Table.Rows.IndexOf(dr);
            Count = dtr.Rows.Count;

  2. #2
    Lively Member Shardox's Avatar
    Join Date
    Nov 2006
    Location
    Barcelona, Spain
    Posts
    123

    Re: index of a datarow in a datatable

    Position=dtr.rows.indexof(dr)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width