Results 1 to 7 of 7

Thread: [2008] Binding Navigator

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    [2008] Binding Navigator

    Hi

    the icons of the Binding Navigator are very small,how can I make them bigger?

    Another question: If the table that is bound to the Binding Navigator contains no row, all the buttons are disabled,how can I make the "Add New" icon enabled

    thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2008] Binding Navigator

    The icons are standard 16x16, which are used in most Windows apps. You can make the buttons bigger by setting the control's AutoSize property to False and then increasing the Size.Height property. That's not going to change the icons though. They are what they are. If you want bigger icons then you have to provide them yourself.

    As to your other question, you are mistaken. I just tested a BindingNavigator with a BindingSource and even with no DataSource the Add New button was enabled. I then created a DataTable and bound it and the button was still enabled. If yours is not then there must be some other reason.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    Re: [2008] Binding Navigator

    thanks for your reply

    I need one more question:When the user presses the "Save",before the actual changes are saved I want to add some code to make sure that the entered data is valid,if yes the changes are saved otherwise no

    Any help

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2008] Binding Navigator

    Clicking the Save button simply raises an event. You still need code in the handler for that event to perform the actual saving. That's where you'd put your validation code and then only save if the data passes.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    Re: [2008] Binding Navigator

    In my BindingNavigator,The "Save" is working But the Delete does not work.When the user presses on "Delete",the record disappear but it reappears when reloading the form

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2008] Binding Navigator

    All the Delete button does is flag a row as deleted locally. If you don't save the changes from your bound DataTable back to the database then that change is not committed and the row is never actually deleted, so it shows up again next time you run your app.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    Re: [2008] Binding Navigator

    I tried

    vb Code:
    1. Private Sub BindingNavigatorDeleteItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorDeleteItem.Click
    2.         If MessageBox.Show("Are you sure?", "", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
    3.             Me.TableAdapterManager.UpdateAll(Me.DataSet1)
    4.         End If
    5.     End Sub
    But it didn't work

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