Results 1 to 5 of 5

Thread: re-positioning a binding navigator

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Posts
    28

    re-positioning a binding navigator

    Hi

    I created a form that has two datagridviews showing data from two tables.

    I also have on this form two bindingnavigators that allows me to browse/navigate through the two tables. The problem is that the two bindingnavigators are positioned at the top of the form, and I would like to design the form so that each bindingnavigator is positioned on top of each datagridview.

    I can't seem to move the bindingnavigators. Can anyone help me with this ?

    There is also another small problem in that on the second bindingnavigator, there is no save button. Can someone tell me how to add one ?

    Regards,
    Kareem.

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    109,060

    Re: re-positioning a binding navigator

    A Bindingnavigator is just an inherited ToolStrip. All behaviour of the ToolStrip class is inherited. By default a ToolStrip or BindingNavigator has its Dock property set to Top, which is why you can't move it. You should first set the Dock property to None to release the strip, then I'd suggest adding Panel to your form, moving the grid and the strip to the Panel, then setting the strip's Dock property back to Top. Now the strip will dock to the top of the Panel, so you can control the strip and the grid as a unit.

    As for a Save button, again, the BindingNavigator is just a ToolStrip. You can add Save button to it the same way you would any ToolStrip. You can choose its Insert Standard Items task and then remove the buttons you don't need, or you can use the drop-down selector on the strip itself to add a button and then set its properties. You'd then double-click it to create a Click event handler and add your logic to save the data there.

  3. #3
    Junior Member
    Join Date
    Mar 2006
    Posts
    31

    Re: re-positioning a binding navigator

    Try a property of .dock in the properties section for the binding navigator. You can position a navigator to top of form and another to the bottom of same form.

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    109,060

    Re: re-positioning a binding navigator

    Quote Originally Posted by thisisprem
    Try a property of .dock in the properties section for the binding navigator.
    Why didn't I think of that? Hang on... I did. Thanks for repeating it though.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Aug 2007
    Posts
    28

    Re: re-positioning a binding navigator

    Hi,

    Thanks ! really appreciate your help .

    Regards,
    Kareem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width