Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGridView and On Screen Keyboard

Status
Not open for further replies.

danielkelly

IS-IT--Management
Aug 13, 2006
28
AU
Hi All,

Im developing a POS application as part of a personal project. The project has a Datagridview which has the items being sold (Quantity,Item Name, Price etc). The Datagridview is on the left of the screen and on the bottom right is my virtual keypad which is basically just a series of Buttons, one for each number. The rest of teh screen is made up of various buttons indicating stock items to sell.

Im having problems getting my head around how to modify a value in the datagrid using the on screen Keyboard. If I click on the button wont focus be taken away from teh Datgridview cell i want to edit?

For example I want the user to click in the Quantity Row on the datgrid and it selects (highlights) what is currently in there (1 For Example) and then if I hit the "2" Button it replaces the 1 with a 2.

Any assistance would be greatly appreciated.

Thanks,

Daniel.
 
You might want to look at some of the events of the DataGridView. Perhaps CellEnter. Using the method, capture the row and column (cell) where the cursor is into a form-level (global?) variable. So as the user clicks in various cells in the datagridview, the name/location of the current cell is recorded.

When a user clicks on the command button, you will need to reference this variable to know which cell to put the value into.

Make sense??

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB.NET Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top