?
Solved

Rownumber from DataRow

Posted on 2006-04-25
2
Medium Priority
?
1,153 Views
Last Modified: 2010-05-18
This is probably a fairly simple question which I cannot seem to recall the answer.  I have a Datarow which I have pulled from a datagrid by using the following command:

(dtInfoSchema is a datatable)
dr = dtInfoSchema.Rows.Find(obj);

What I would like to know is which row from within the datagrid this datarow was positioned at.  How can I find out which row number in the datagrid this row is positioned at?  I need to know so that I can make a specific cell active and selected at that row number.


0
Comment
Question by:gvector1
1 Comment
 
LVL 12

Accepted Solution

by:
topdog770 earned 2000 total points
ID: 16535495
//Obtaining Current DataTable Row for a DataGrid

http://www.codeproject.com/cs/miscctrl/DBGridCurrentRow.asp >

// finding the index for a specific row  < from link below >

                intRow = ds.Tables[0].DefaultView.Find(txtFindArg.Text);

This link provides some good examples and complete info on getting the specific index of a datarow in a datatable

http://www.akadia.com/services/dotnet_find_methods.html  >



0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question