 |
|
 |
sir how can i use ms access to be my database in this tutorial.. thank you sir
|
|
|
|
 |
|
 |
Good article! helpful for beginners
|
|
|
|
 |
|
 |
A very clear and informative article
|
|
|
|
 |
|
 |
Hi, is there a way to create details form similar way to what was done in this example? My issue is that I have a table that has lots of fields.. the only way to create detail form is to drag and drop them manually, in above example fields were created automatically..
thanks..
|
|
|
|
 |
|
|
 |
|
 |
Hello!
So I'm make my own DB application see on your codes how Edit and AddNew Row
Add and Edit methods work is ok!
Please tell me how how delete record from DataViewGrid
Thanks!
|
|
|
|
 |
|
 |
My insert does not seem to work even though I added another Sub New.
When I press my insert button, the update form always goes to the first record and then displays the first record values on my form. I added a button and call my form just with the dataset and no position.
|
|
|
|
 |
|
 |
Wornderful example and I have shared your comments with other. In a free society we should be able to express our beliefs. Back to my question--I got through your example and found it was in VB. Could you publish the example in c#? I tried to convert but would not get it to work.
Peace
|
|
|
|
 |
|
 |
Please abstain from religious announcements.
|
|
|
|
 |
|
 |
Hi Robert, nice article!
I have a question, is my first time using strongly typed datasets in vb, then I got stucked in filling a combobox depending on another combobox. i.e. I have a combo wich is a subset of another one.
Example:
Table 1
Id
Name
Tbl2_Id
Tbl3_Id
Table 2
Tbl2_Id
Description
Table 3
Tbl2_Id --> Foreign Key to Table 2
Tbl3_Id
Description
The question is: I don't know how to fill the static combo in datagridview on form1, nor (and most important) how to load combo in form2 (edit).
Thanks
|
|
|
|
 |
|
 |
Hi
I want to know that i can i export gridview data into the sql database table.
Thanx
Naresh Rajput
|
|
|
|
 |
|
 |
Hi Robert,
In the Edit form, if the user changes the text of the Primary Key column, then I want to give the user, the option of "save as" rather than just overwrite the value.
For e.g.
Say Customer Name is a primary key and user has come to edit Customer details. If the user keys in a new Customer name (and leaves all other details as is), it should be saved as a new entry.
Any clues on this using the technique you have demonstrated.
TIA
|
|
|
|
 |
|
 |
Just like add new row, could you please tell me how to delete rows? i have a Ins,Upd,Delete trigger on my table. I implemented delete row but everytime i try to add a row after deleting one, the trigger throws an error about column values being null???
Any ideas?
|
|
|
|
 |
|
 |
Hey,
I'm having trouble with this..
I can get it to popup the edit form but I made a messagebox to alert what it was passing as the position and it's passing -1.
Any clue how this could be? Keep in mind, I'm new to this and have only been developing VB.NET for 3 days.
Any help would be appreciated!
|
|
|
|
 |
|
 |
-1 Usually means that there is no row selected or that it cannot find the row in the dataset.
- Robert R Freeman
|
|
|
|
 |
|
 |
Well I'm double clicking the row header so I know a row is selected and it exists...
Any other ideas?
|
|
|
|
 |
|
 |
I did the whole thing following instructions. It works, byt actually I`m not able to continue to add update functionality.
On the Detail Form, when I change the value in any comboboxe, then I`m not able to move mouse cursor from there.
Any suggestion?
|
|
|
|
 |
|
|
 |
|
 |
Fortunatelly I found a (workaround) solution. I just set [data source update mode] of [text] property to Never.
So ... for anyone figthting with the same problem
- Select combobox
- in properties windows find Data/DataBindings/Advanced
- In new window openet select [Text] property and set hist [Data Source Update Mode] to [Never]
.
|
|
|
|
 |
|
 |
Thanks for posting your workaround.
- Robert R Freeman
|
|
|
|
 |
|
 |
Hey,
Are you sure you followed ALL the instructions? I had the same problem, and when you wrote your workaround, I knew what I was doing wrong: I forgot to apply this:
"Set the DataBindings.Text property to None since we're now binding to the SelectedValue property" (right before step 4).
Csabi
|
|
|
|
 |
|
 |
Hi Robert,
I'm new to DataGridView and datasets and your article helped me a lot! But I still have one question: how can I add new data to the data set using Detail edit form?
Thanks!
Csabi
|
|
|
|
 |
|
 |
It's actually quite easy.
Add another sub new to Order without the position parameter.
Use the BindingSource.AddNew method.
'This instantiation method will be used to insert a new record. No position is supplied.
Public Sub New(ByVal nwDataSet As NorthwindDataSet)
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
' We will specify the DataSet from the DataGrid form here
Me.NorthwindDataSet = nwDataSet
Me.OrdersBindingSource.DataSource = Me.NorthwindDataSet
Me.CustomersBindingSource.DataSource = Me.NorthwindDataSet
Me.EmployeesBindingSource.DataSource = Me.NorthwindDataSet
Me.OrdersBindingSource.AddNew()
End Sub
Then add the button or link and handle the click on Orders.
Private Sub LinkAddRow_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkAddRow.LinkClicked
Dim editForm As New Order(Me.NorthwindDataSet)
editForm.Show()
End Sub
If you want to do some intialization in Order, then use the OrdersBindingSource.AddingNew event.
- Robert R Freeman
|
|
|
|
 |
|
 |
Hello Robert!
Great article! Pretty much what I need to do, except I don't need to edit anything, just display the info on my "Detail Page".
Private Sub grdMain_RowHeaderMouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles grdMain.RowHeaderMouseDoubleClick
If Me.grdMain.SelectedRows.Count > 0 Then
Dim DetailsForm As New frmDetails(Me.PhaRxTestDataSet, _
Me.PhaRxTestDataSet.SelectMainActive.Rows.IndexOf _
(CType(CType(Me.grdMain.SelectedRows(0).DataBoundItem, DataRowView).Row, PhaRxTestDataSet.SelectMainActiveRow)))
frmDetails.Show()
End If
End Sub
This is what I have on my side. "SelectMainActive" is a tableadapter I created. I think I can treat it just like a table. I get this error message with the above code,
Error 1 Too many arguments to 'Public Sub New()'. C:\Documents and Settings\Rudy\My Documents\Visual Studio 2005\Projects\RxMgmt\RxMgmt\Main.vb 28 47 RxMgmt
Any ideas what I may be doing wrong?
Thanks!
Rudy
|
|
|
|
 |
|
 |
This error usually means you either put too many arguments in your instantiation of frmDetails(Arg1, Arg2, Arg3) or you forgot to put the parameters in your Sub New on frmDetails.
- Robert R Freeman
|
|
|
|
 |