Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Changing DataBound values w/o Changing Focus
 

Changing DataBound values w/o Changing Focus

Hello,

I hope the title explained our little predicament.  We have some text boxes, some combo boxes, and a custom-built component bound to a Collection.  Tabbing from field to field updates the data bindings just fine.  However, we have some tool buttons that don't receive focus, and main menu items that also don't "take focus away" from a given control.  We're having problems updating data bound values when the non-focused buttons are clicked, even though we are calling Form.CurrencyManager.EndEdit().  It may have something to do with the "hidden editors" on top of the other controls,  but is there anything we can do to force the update?

Thanks

Jim Stanley
Media Services, Inc.
Jim Stanley  Thursday, August 11, 2005 10:43 PM

For menu's that don't take focus you can use Form.Validate().  CurrencyManager.EndCurrentEdit() should work - it is possible you are not using the correct CurrencyManager though.  In order to determine if that's your issue, I'd need to see how you are setting up data binding as well as how you are getting the CurrencyManager.

Joe Stegman
The Windows Forms Team
Microsoft Corp.

This posting is provided "AS IS" with no warranties, and confers no rights.

Joe Stegman  Friday, August 12, 2005 2:44 AM

For menu's that don't take focus you can use Form.Validate().  CurrencyManager.EndCurrentEdit() should work - it is possible you are not using the correct CurrencyManager though.  In order to determine if that's your issue, I'd need to see how you are setting up data binding as well as how you are getting the CurrencyManager.

Joe Stegman
The Windows Forms Team
Microsoft Corp.

This posting is provided "AS IS" with no warranties, and confers no rights.

Joe Stegman  Friday, August 12, 2005 2:44 AM
Thanks Joe!  Form.Validate() did the trick.

Jim Stanley
Media Services, Inc.
Jim Stanley  Tuesday, August 16, 2005 10:59 PM

You can use google to search for other answers

Custom Search

More Threads

• Backup SQL Server 2005 throw VB 2005
• DataGridView Virtual Mode RowCount Bug
• Binding
• How to cancel the process untill the validations conditions are met when click the button? --VB.net or VS 2005
• radiogroup databound control
• DataGridView ComboBox type-in example ?
• binding datagrid column
• SQL Database item is not updateable
• DataGridBoolColumn check/uncheck on one click?
• The same table 'Item' cannot be the child table in two nested relations.-Error