Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > How does the bindingnavigator work ?
 

How does the bindingnavigator work ?

two questions

first, how does the bindingnavigator know that there are no records, and the buttons on it are all disabled

second, i read in a lot of places that the save button is automatically part of the bindingnavigator, but when i drag the component on to my form, i
don't see the save button



thank you
Truminator  Monday, August 10, 2009 1:51 PM
> how does the bindingnavigator know that there are no recor

In this case, the BindingSource associated with the BindingNavigator returns Nothing for Current and zero for Count.

> i read in a lot of places that the save button is automatically part of the bindingnavigator

No. However, if you use a ToolStrip, it has a command to automatically add standard tool bar buttons. This basically just adds images, you still must provide all the functionality yourself.

You might find that the BindingNavigator is underpowered / hard to customize. In this case, you can create a ToolStrip with exactly the buttons you want and call the relevant methods on the BindingSource when the user presses buttons(such as MoveNext, etc.).
BinaryCoder  Monday, August 10, 2009 11:27 PM
> how does the bindingnavigator know that there are no recor

In this case, the BindingSource associated with the BindingNavigator returns Nothing for Current and zero for Count.

> i read in a lot of places that the save button is automatically part of the bindingnavigator

No. However, if you use a ToolStrip, it has a command to automatically add standard tool bar buttons. This basically just adds images, you still must provide all the functionality yourself.

You might find that the BindingNavigator is underpowered / hard to customize. In this case, you can create a ToolStrip with exactly the buttons you want and call the relevant methods on the BindingSource when the user presses buttons(such as MoveNext, etc.).
BinaryCoder  Monday, August 10, 2009 11:27 PM

You can use google to search for other answers

Custom Search

More Threads

• Action Generic Delegate is a powerful tool.
• DataGridView - Checkboxes
• Issues with Filling datasets using LoadDataSet data blocks
• DataGrid examples
• Multirow Select Datagrid
• Error: Key not valid for use in the specific state.
• DataGrid Formatting when bound to ArrayList?
• Get one row from two rows in SQL query
• DataSet Clear() performance problem
• Associate Data Source with CurrencyManager ??