Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > how to make sure the cursor is in the cell on Datagridview control?
 

how to make sure the cursor is in the cell on Datagridview control?

Hi,

I am currently working with a Windows Form application, and there is a datagridview control on the form which will provide property information for the element selected in the application. Say, for example, this datagridview is now showing the coordinates of the element (CAD application), I would like to select one coordinate in one cell and change its value. Below is one scenario that does not achieve what we want:

1. click on the cell. This will select the whole lot of the value (i think this is the default behaviour of datagridview?)
2. press "Delete" button on the keyboard, this will erase the coordinate value from the cell, BUT the focus cursor is not within the cell. User can not type in the value they want.

How can I make sure the cursor is well showing in the cell allowing further inputting? (without actually clicking in the cell)



Tigerwood2006  Wednesday, May 14, 2008 12:53 AM

Hi Tigerwood2006,

You can refer to the FAQ of Data Binding

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2499441&SiteID=1

Regards,

Roy

Roy Zhou - MSFT  Tuesday, May 20, 2008 7:14 AM

Hi Tigerwood2006,

You can refer to the FAQ of Data Binding

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2499441&SiteID=1

Regards,

Roy

Roy Zhou - MSFT  Tuesday, May 20, 2008 7:14 AM

You can use google to search for other answers

Custom Search

More Threads

• populate datagrid with datareader in vb.net
• Identifying an XML element from a datagrid entry
• Insert, Update don't work for me with sqlserver 2005
• setting Cell focus back, if validation fails Datagridview
• Filtering Columns at Gridview
• Check datagridview last row
• Datagrid and Errorhandling - best practice ?
• Urgent> Custom RichTextBoxCell for DataGridView or scrolling for DataGridViewTextBox?
• DataGridView-Cell Merging
• DataGridView - manipulating Columns is slow on second time