How to find which row in a datagrid is in focus

I have an ASP.NET application, i have a datagrid which has a textbox. the user can maintain focus (cursor) on a particular textbox in a row, and then click to select a value from a search window.
Upon selection the value returned should be poppulated in the textbox row that was in focus on the datagrid
LVL 1
countrymeisterAsked:
Who is Participating?
 
raja_ind82Connect With a Mentor Commented:
Without datagrid action, we can't get the selected row index. Please fnd the attached code WebSite1.zip to get the values from all the textboxes. use this selected values and do the search

Based on your requirement solution may vary.  you can set values in some hidden ctrl while focusing the textbox and use that for search.
0
 
SAMIR BHOGAYTAFreelancer and IT ConsultantCommented:
Hello,

You have to use the currentcell property of a datagrid and then after you can change the backcolor on focus event of a datagrid, so you can find which row in a datagrid is in focus.
0
 
countrymeisterAuthor Commented:
samirbhogayta:

have you tried it for an ASP.NET app , because I do not see that. proeprty for datgrid .Currentcell
I do see it available in windows forms
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.