|
-
Jul 28th, 2008, 02:58 AM
#1
Thread Starter
Fanatic Member
[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
-
Jul 28th, 2008, 03:11 AM
#2
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.
-
Jul 28th, 2008, 04:11 AM
#3
Thread Starter
Fanatic Member
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
-
Jul 28th, 2008, 08:22 AM
#4
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.
-
Jul 28th, 2008, 09:11 AM
#5
Thread Starter
Fanatic Member
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
-
Jul 28th, 2008, 09:35 AM
#6
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.
-
Jul 29th, 2008, 02:49 AM
#7
Thread Starter
Fanatic Member
Re: [2008] Binding Navigator
I tried
vb Code:
Private Sub BindingNavigatorDeleteItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorDeleteItem.Click
If MessageBox.Show("Are you sure?", "", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
Me.TableAdapterManager.UpdateAll(Me.DataSet1)
End If
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|