Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Tab not working on the textbox control causing null values in the currencymanager
 

Tab not working on the textbox control causing null values in the currencymanager

I have a form with 5+ textbox controls all of them tabindexed in the order. These controls are bound to a datasource in the program. Using a currencymanager an addnew is done to get the new values from the form. What I noticed is that after entering value on the first textbox, when the tab is pressed, the control is not moving to the second textbox, but one more tap on the tab moves it. This is causing the current list item to have a null value for the field even though on the form value is entered on the control. This is causing the endedit of the datarowview of the currencymanger to fail.

If I enter some more data on the textbox after the tab failed to move to the next control, this error is mysteriously disappeared!

Anyone has experienced this problem? Any possible reasons for why the tab press is not moving the control to the next box?

Thanks

  • Moved byeryangMSFTThursday, July 30, 2009 2:17 AMThis is a WinForm issue. (From:.NET Base Class Library)
  •  
anandnairv  Tuesday, July 28, 2009 4:43 PM
Thanks Li,

There was some problem with TabStop. Initially it was set to yes..that was causing the probleem..now it is gone..thanks
  • Marked As Answer byanandnairv Friday, July 31, 2009 4:01 AM
  •  
anandnairv  Friday, July 31, 2009 4:01 AM
Hi anandnairv,

Could you please provide a code snippet? From my experience, the root cause of your issue is mostly related to the data validation. When you press a Tab, the typed text would be pushed back to the data source. If this fail, it would keep focus on the current TextBox and do not move to the next TextBox.

Best regards,
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
Aland Li  Thursday, July 30, 2009 6:23 AM
Thanks Li,

There was some problem with TabStop. Initially it was set to yes..that was causing the probleem..now it is gone..thanks
  • Marked As Answer byanandnairv Friday, July 31, 2009 4:01 AM
  •  
anandnairv  Friday, July 31, 2009 4:01 AM

You can use google to search for other answers

Custom Search

More Threads

• DataGridView Problem
• CheckedListBox and DataMember/ValueMember
• linkLabel column in datagrid
• Typed dataset autoincrement column bound to datagridview, increments unexpectedly
• cann't xsd.exe generate partial dataset class with table adapters??
• Error while accessing value of the control
• Datagridview row colour changed based on cell value works ok until sorted
• HELP - Ultragrid ComboBox columns
• Empty Dataset
• stored procedure returns five columns and i need to dispaly three columns