Click here to Skip to main content
15,924,935 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: sourcecode download Pin
Tom Deketelaere4-May-09 5:16
professionalTom Deketelaere4-May-09 5:16 
AnswerRe: sourcecode download Pin
Dave Kreskowiak4-May-09 5:16
mveDave Kreskowiak4-May-09 5:16 
AnswerRe: sourcecode download Pin
Christian Graus4-May-09 13:36
protectorChristian Graus4-May-09 13:36 
GeneralRe: sourcecode download Pin
Rajesh Anuhya4-May-09 18:39
professionalRajesh Anuhya4-May-09 18:39 
QuestionHow can I take one record from one form and the values to open another form? Pin
waner michaud4-May-09 3:27
waner michaud4-May-09 3:27 
AnswerRe: How can I take one record from one form and the values to open another form? Pin
Tom Deketelaere4-May-09 3:37
professionalTom Deketelaere4-May-09 3:37 
GeneralRe: How can I take one record from one form and the values to open another form? Pin
waner michaud4-May-09 5:42
waner michaud4-May-09 5:42 
GeneralRe: How can I take one record from one form and the values to open another form? Pin
Andy Missico4-May-09 14:54
Andy Missico4-May-09 14:54 
I have no clear answer, but I do have some comments to help you simplify what you are doing.

0) Use a BindingSource. See documentation and walk-throughs.

1) Just pass the row. There is no need for handling the data set then filtering or anything else. You can get to the table and data set from the row.

2) Manually bind to the row using a BindingSource. In some cases, it is easier to create a class to wrap the data row and handle the business rules.

3) When user clicks okay you may have to call row.AcceptChanges. This depends on how you data bind.

4) You may want to consider overriding the ShowDialog method as in ShowDialog(row As DataRow). Usually, it is easier because it allows you some setup and clean-up. For example, ...

Private _row As DataRow

Public Overloads Sub ShowDialog(ByVal row As DataRow)
    Dim iResult As DialogResult

    _row = row
    __bindingSource.DataSource = row

    _row.BeginEdit()
    'other setup

    iResult = MyBase.ShowDialog

    'clean-up
    If iResult = System.Windows.Forms.DialogResult.OK Then
        _row.AcceptChanges()
    Else
        _row.CancelEdit()
    End If

End Sub

AnswerRe: How can I take one record from one form and the values to open another form? Pin
Tiyani Miyambo4-May-09 22:47
Tiyani Miyambo4-May-09 22:47 
GeneralRe: How can I take one record from one form and the values to open another form? Pin
waner michaud6-May-09 8:34
waner michaud6-May-09 8:34 
Questionhow to print in textbox value? Pin
JC.KaNNaN4-May-09 0:11
JC.KaNNaN4-May-09 0:11 
AnswerRe: how to print in textbox value? Pin
Tiyani Miyambo4-May-09 0:21
Tiyani Miyambo4-May-09 0:21 
AnswerRe: how to print in textbox value? Pin
Baran M4-May-09 1:09
Baran M4-May-09 1:09 
GeneralRe: how to print in textbox value? [modified] Pin
riced4-May-09 1:24
riced4-May-09 1:24 
AnswerRe: how to print in textbox value? Pin
Dave Kreskowiak4-May-09 4:16
mveDave Kreskowiak4-May-09 4:16 
Questionhiding windows taskbar Pin
hrishiS3-May-09 23:42
hrishiS3-May-09 23:42 
AnswerRe: hiding windows taskbar Pin
Christian Graus3-May-09 23:52
protectorChristian Graus3-May-09 23:52 
GeneralRe: hiding windows taskbar Pin
hrishiS4-May-09 0:00
hrishiS4-May-09 0:00 
GeneralRe: hiding windows taskbar Pin
Samir Ibrahim4-May-09 0:14
Samir Ibrahim4-May-09 0:14 
GeneralRe: hiding windows taskbar Pin
hrishiS4-May-09 0:20
hrishiS4-May-09 0:20 
GeneralRe: hiding windows taskbar Pin
Samir Ibrahim4-May-09 0:29
Samir Ibrahim4-May-09 0:29 
GeneralRe: hiding windows taskbar Pin
hrishiS4-May-09 1:04
hrishiS4-May-09 1:04 
GeneralRe: hiding windows taskbar Pin
Samir Ibrahim4-May-09 1:30
Samir Ibrahim4-May-09 1:30 
GeneralRe: hiding windows taskbar Pin
hrishiS4-May-09 19:35
hrishiS4-May-09 19:35 
GeneralRe: hiding windows taskbar Pin
Dave Kreskowiak4-May-09 4:12
mveDave Kreskowiak4-May-09 4:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.