[Last Call] Learn how to a build a cloud-first strategyRegister Now


How to find which row in a datagrid is in focus

Posted on 2011-10-31
Medium Priority
Last Modified: 2012-05-12
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
Question by:countrymeister
LVL 11

Expert Comment

ID: 37060614

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.

Author Comment

ID: 37060743

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
LVL 14

Accepted Solution

raja_ind82 earned 2000 total points
ID: 37060890
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.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month18 days, 6 hours left to enroll

829 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