473,605 Members | 2,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ComboBox databindng Problem

ComboBox databindng Problem

== How the ComboBox is setup and used:

My comboBox is populated by a lookup table. The ValueMember is the
lookup table's Id and the DisplayMember is the text from a
corresponding field in the lookup table. In my data table we store the
ID in what I will call the 'key' field.

== Description of the desired operation:

1.) When the user selects a record in the datagrid the bound comboBox
displays the DisplayMember of the corresponding Value stored in the
data table's 'key' field.
2.) When the user selects a record in where the 'key' field is null (no
selection was made or saved) the comboBox display should be empty to
indicated that fact.

== Description of the problem:

Simply put, #2 above does not happen. Here is what does; When the user
moves to a record in the datagrid in which the 'key' field is null the
comboBox is *not* empty, it incorrectly displays the first possible
selection in the comboBox.

== Additional facts: (read carefully - this could be a little
confusing)

Consider a scenario in which the 1st record stores a value in the 'key'
field and in the 2nd and 3rd records in which the 'key' field is null.
Here is what happens when we walk through the records;
In the 1st record: the comboBox always displays the correct value
corresponding to the 'key' field.
As the user moves to the 2nd record: incorrectly - values are shown
rather than being empty.
As the user moves to the 3rd record: correctly - the comboBox is shown
empty.
As the user moves back to the 2nd record: correctly - the comboBox is
shown empty this time.

In summary - when you move from a record with a populated 'key' to a
record with a null 'key' field - incorrect values will *always* be
displayed. When you move from record with a null 'key' field to another
record with a null 'key' field - correctly a *blank* will *always* be
displayed in the comboBox. Records with a populated 'key' filed will
*always display correct values.

What is the reason for the wrong display behavior?
What is the solution to get proper display behavior?

=============== =========
BTW - Here is the order in which I populate and bind the controls and
datagrid.
1.) populate the dataset with the datatables for the datagrid, controls
and the combobox
2.) set the combobox datasource, value and display members
3.) set the datagrid datasource and datamember
4.) bind the controls to the datatable and corresponding field
5.) set the binding context to the datatable

Nov 21 '05 #1
30 4557
Hi,

"dbuchanan" <db*********@ho tmail.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
ComboBox databindng Problem

== How the ComboBox is setup and used:

My comboBox is populated by a lookup table. The ValueMember is the
lookup table's Id and the DisplayMember is the text from a
corresponding field in the lookup table. In my data table we store the
ID in what I will call the 'key' field.

== Description of the desired operation:

1.) When the user selects a record in the datagrid the bound comboBox
displays the DisplayMember of the corresponding Value stored in the
data table's 'key' field.
2.) When the user selects a record in where the 'key' field is null (no
selection was made or saved) the comboBox display should be empty to
indicated that fact.

== Description of the problem:

Simply put, #2 above does not happen. Here is what does; When the user
moves to a record in the datagrid in which the 'key' field is null the
comboBox is *not* empty, it incorrectly displays the first possible
selection in the comboBox.

== Additional facts: (read carefully - this could be a little
confusing)

Consider a scenario in which the 1st record stores a value in the 'key'
field and in the 2nd and 3rd records in which the 'key' field is null.
Here is what happens when we walk through the records;
In the 1st record: the comboBox always displays the correct value
corresponding to the 'key' field.
As the user moves to the 2nd record: incorrectly - values are shown
rather than being empty.
As the user moves to the 3rd record: correctly - the comboBox is shown
empty.
As the user moves back to the 2nd record: correctly - the comboBox is
shown empty this time.

In summary - when you move from a record with a populated 'key' to a
record with a null 'key' field - incorrect values will *always* be
displayed. When you move from record with a null 'key' field to another
record with a null 'key' field - correctly a *blank* will *always* be
displayed in the comboBox. Records with a populated 'key' filed will
*always display correct values.

What is the reason for the wrong display behavior?
What is the solution to get proper display behavior?

=============== =========
BTW - Here is the order in which I populate and bind the controls and
datagrid.
1.) populate the dataset with the datatables for the datagrid, controls
and the combobox
2.) set the combobox datasource, value and display members
3.) set the datagrid datasource and datamember
4.) bind the controls to the datatable and corresponding field
5.) set the binding context to the datatable


Not sure what you mean in number 5.

Altough it seems that other people had a similar problem with null values
and lookup combo, i can not reproduce this problem. It works perfectly even
on the first null.

Maybe you could post the entire code that reproduces this problem ?
What version of framework are you using ?

hth,
greetings
Nov 21 '05 #2
Hi,

"dbuchanan" <db*********@ho tmail.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
ComboBox databindng Problem

== How the ComboBox is setup and used:

My comboBox is populated by a lookup table. The ValueMember is the
lookup table's Id and the DisplayMember is the text from a
corresponding field in the lookup table. In my data table we store the
ID in what I will call the 'key' field.

== Description of the desired operation:

1.) When the user selects a record in the datagrid the bound comboBox
displays the DisplayMember of the corresponding Value stored in the
data table's 'key' field.
2.) When the user selects a record in where the 'key' field is null (no
selection was made or saved) the comboBox display should be empty to
indicated that fact.

== Description of the problem:

Simply put, #2 above does not happen. Here is what does; When the user
moves to a record in the datagrid in which the 'key' field is null the
comboBox is *not* empty, it incorrectly displays the first possible
selection in the comboBox.

== Additional facts: (read carefully - this could be a little
confusing)

Consider a scenario in which the 1st record stores a value in the 'key'
field and in the 2nd and 3rd records in which the 'key' field is null.
Here is what happens when we walk through the records;
In the 1st record: the comboBox always displays the correct value
corresponding to the 'key' field.
As the user moves to the 2nd record: incorrectly - values are shown
rather than being empty.
As the user moves to the 3rd record: correctly - the comboBox is shown
empty.
As the user moves back to the 2nd record: correctly - the comboBox is
shown empty this time.

In summary - when you move from a record with a populated 'key' to a
record with a null 'key' field - incorrect values will *always* be
displayed. When you move from record with a null 'key' field to another
record with a null 'key' field - correctly a *blank* will *always* be
displayed in the comboBox. Records with a populated 'key' filed will
*always display correct values.

What is the reason for the wrong display behavior?
What is the solution to get proper display behavior?

=============== =========
BTW - Here is the order in which I populate and bind the controls and
datagrid.
1.) populate the dataset with the datatables for the datagrid, controls
and the combobox
2.) set the combobox datasource, value and display members
3.) set the datagrid datasource and datamember
4.) bind the controls to the datatable and corresponding field
5.) set the binding context to the datatable


Not sure what you mean in number 5.

Altough it seems that other people had a similar problem with null values
and lookup combo, i can not reproduce this problem. It works perfectly even
on the first null.

Maybe you could post the entire code that reproduces this problem ?
What version of framework are you using ?

hth,
greetings
Nov 21 '05 #3
> Not sure what you mean in number 5.

Here is what I mean by number 5...
This variable is created;

Protected WithEvents _bmb As BindingManagerB ase

Then just after the controls binding I do this;
_bmb = Me.BindingConte xt(_dt)
What version of framework are you using ? DotNet framework 1.1.4322 SP1
Visual Studio 2003 Version 7.1.3088
Maybe you could post the entire code that reproduces this problem ?

I'll try to do this within a day.

Nov 21 '05 #4
> Not sure what you mean in number 5.

Here is what I mean by number 5...
This variable is created;

Protected WithEvents _bmb As BindingManagerB ase

Then just after the controls binding I do this;
_bmb = Me.BindingConte xt(_dt)
What version of framework are you using ? DotNet framework 1.1.4322 SP1
Visual Studio 2003 Version 7.1.3088
Maybe you could post the entire code that reproduces this problem ?

I'll try to do this within a day.

Nov 21 '05 #5
Hi Bart,
Maybe you could post the entire code that reproduces this problem ?


Here is the entire code necessary to reproduce the problem. (It is
simplified to contain only the code necessary)
1.) Form Code
2.) Data Tables (SQL)
3.) Sample Data
4.) Data set code
5.) Data access code
6.) Stored Procedures

=============== =======
1.) Form Code
\\
Public Class f010Jobs
Inherits System.Windows. Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeCompo nent()

'Add any initialization after the InitializeCompo nent() call
End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Disp ose()
End If
End If
MyBase.Dispose( disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.Componen tModel.IContain er

'NOTE: The following procedure is required by the Windows Form
Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents labUserNote As System.Windows. Forms.Label
Friend WithEvents txtJobDescripti on As System.Windows. Forms.TextBox
Friend WithEvents labJobDescripti on As System.Windows. Forms.Label
Friend WithEvents labCustomerName As System.Windows. Forms.Label
Friend WithEvents labJobNumber As System.Windows. Forms.Label
Friend WithEvents txtJobNumber As System.Windows. Forms.TextBox
Friend WithEvents txtUserNote As System.Windows. Forms.TextBox
Friend WithEvents grpSystemServic es As System.Windows. Forms.GroupBox
Friend WithEvents txtShopPSI As System.Windows. Forms.TextBox
Friend WithEvents labShopPsi As System.Windows. Forms.Label
Friend WithEvents labSystemVoltag e As System.Windows. Forms.Label
Friend WithEvents labSystemPhase As System.Windows. Forms.Label
Friend WithEvents labSystemAmps As System.Windows. Forms.Label
Friend WithEvents txtSystemAmps As System.Windows. Forms.TextBox
Friend WithEvents lblpkJobId As System.Windows. Forms.Label
Friend WithEvents labJobId As System.Windows. Forms.Label
Friend WithEvents cboSystemPhase As System.Windows. Forms.ComboBox
Friend WithEvents cboSystemVoltag e As System.Windows. Forms.ComboBox
Friend WithEvents chkHasCircuitBr eakersYN As
System.Windows. Forms.CheckBox
Friend WithEvents chkApprovedYN As System.Windows. Forms.CheckBox
Friend WithEvents chkCompletedYN As System.Windows. Forms.CheckBox
Friend WithEvents labReferenceJob Number As System.Windows. Forms.Label
Friend WithEvents lblReferenceJob Number As System.Windows. Forms.Label
Friend WithEvents chkIsMasterYN As System.Windows. Forms.CheckBox
Friend WithEvents chkAllProcesses AddedYN As
System.Windows. Forms.CheckBox
Friend WithEvents chkAllProcesses ConfiguredYN As
System.Windows. Forms.CheckBox
Friend WithEvents chkArchive As System.Windows. Forms.CheckBox
Friend WithEvents ToolTip1 As System.Windows. Forms.ToolTip
Friend WithEvents lblCountOfJobs As System.Windows. Forms.Label
Friend WithEvents labTotalJobs As System.Windows. Forms.Label
Friend WithEvents chkAllTasksAdde dYN As System.Windows. Forms.CheckBox
Friend WithEvents MsdnTextboxVali dator1 As
MSDNTextboxVali dator.MSDNTextb oxValidator
Friend WithEvents ErrorProvider1 As System.Windows. Forms.ErrorProv ider
Friend WithEvents txtCustomerName As System.Windows. Forms.TextBox
Friend WithEvents lblCountOfConfi gured As System.Windows. Forms.Label
Friend WithEvents labTotalConfigu red As System.Windows. Forms.Label
Friend WithEvents Button1 As System.Windows. Forms.Button
Friend WithEvents Button2 As System.Windows. Forms.Button
Friend WithEvents btnExit As System.Windows. Forms.Button
Protected WithEvents txtEditedBy As System.Windows. Forms.TextBox
Protected WithEvents txtEditedOn As System.Windows. Forms.TextBox
Protected WithEvents txtCreatedBy As System.Windows. Forms.TextBox
Protected WithEvents txtCreatedOn As System.Windows. Forms.TextBox
Protected WithEvents labEditedBy As System.Windows. Forms.Label
Protected WithEvents labEditedOn As System.Windows. Forms.Label
Protected WithEvents labCreatedBy As System.Windows. Forms.Label
Protected WithEvents labCreatedOn As System.Windows. Forms.Label
Public WithEvents DataGrid1 As System.Windows. Forms.DataGrid
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub
InitializeCompo nent()
Me.components = New System.Componen tModel.Containe r
Me.lblpkJobId = New System.Windows. Forms.Label
Me.labJobId = New System.Windows. Forms.Label
Me.chkCompleted YN = New System.Windows. Forms.CheckBox
Me.chkApprovedY N = New System.Windows. Forms.CheckBox
Me.labUserNote = New System.Windows. Forms.Label
Me.labReference JobNumber = New System.Windows. Forms.Label
Me.txtJobDescri ption = New System.Windows. Forms.TextBox
Me.labJobDescri ption = New System.Windows. Forms.Label
Me.labCustomerN ame = New System.Windows. Forms.Label
Me.labJobNumber = New System.Windows. Forms.Label
Me.txtJobNumber = New System.Windows. Forms.TextBox
Me.txtUserNote = New System.Windows. Forms.TextBox
Me.grpSystemSer vices = New System.Windows. Forms.GroupBox
Me.chkHasCircui tBreakersYN = New System.Windows. Forms.CheckBox
Me.txtSystemAmp s = New System.Windows. Forms.TextBox
Me.labSystemAmp s = New System.Windows. Forms.Label
Me.cboSystemPha se = New System.Windows. Forms.ComboBox
Me.labSystemPha se = New System.Windows. Forms.Label
Me.cboSystemVol tage = New System.Windows. Forms.ComboBox
Me.labSystemVol tage = New System.Windows. Forms.Label
Me.txtShopPSI = New System.Windows. Forms.TextBox
Me.labShopPsi = New System.Windows. Forms.Label
Me.chkIsMasterY N = New System.Windows. Forms.CheckBox
Me.lblReference JobNumber = New System.Windows. Forms.Label
Me.chkAllProces sesAddedYN = New System.Windows. Forms.CheckBox
Me.chkAllProces sesConfiguredYN = New System.Windows. Forms.CheckBox
Me.chkArchive = New System.Windows. Forms.CheckBox
Me.ToolTip1 = New System.Windows. Forms.ToolTip(M e.components)
Me.txtCustomerN ame = New System.Windows. Forms.TextBox
Me.lblCountOfJo bs = New System.Windows. Forms.Label
Me.labTotalJobs = New System.Windows. Forms.Label
Me.chkAllTasksA ddedYN = New System.Windows. Forms.CheckBox
Me.MsdnTextboxV alidator1 = New
MSDNTextboxVali dator.MSDNTextb oxValidator(Me. components)
Me.ErrorProvide r1 = New System.Windows. Forms.ErrorProv ider
Me.txtEditedBy = New System.Windows. Forms.TextBox
Me.txtEditedOn = New System.Windows. Forms.TextBox
Me.txtCreatedBy = New System.Windows. Forms.TextBox
Me.txtCreatedOn = New System.Windows. Forms.TextBox
Me.lblCountOfCo nfigured = New System.Windows. Forms.Label
Me.labTotalConf igured = New System.Windows. Forms.Label
Me.Button1 = New System.Windows. Forms.Button
Me.Button2 = New System.Windows. Forms.Button
Me.btnExit = New System.Windows. Forms.Button
Me.labEditedBy = New System.Windows. Forms.Label
Me.labEditedOn = New System.Windows. Forms.Label
Me.labCreatedBy = New System.Windows. Forms.Label
Me.labCreatedOn = New System.Windows. Forms.Label
Me.DataGrid1 = New System.Windows. Forms.DataGrid
Me.grpSystemSer vices.SuspendLa yout()
CType(Me.DataGr id1,
System.Componen tModel.ISupport Initialize).Beg inInit()
Me.SuspendLayou t()
'
'lblpkJobId
'
Me.lblpkJobId.B orderStyle = System.Windows. Forms.BorderSty le.Fixed3D
Me.lblpkJobId.F oreColor = System.Drawing. SystemColors.Gr ayText
Me.lblpkJobId.L ocation = New System.Drawing. Point(120, 352)
Me.lblpkJobId.N ame = "lblpkJobId "
Me.lblpkJobId.S ize = New System.Drawing. Size(248, 23)
Me.lblpkJobId.T abIndex = 1
Me.lblpkJobId.T ag = ""
'
'labJobId
'
Me.labJobId.Loc ation = New System.Drawing. Point(8, 352)
Me.labJobId.Nam e = "labJobId"
Me.labJobId.Tab Index = 0
Me.labJobId.Tag = ""
Me.labJobId.Tex t = "Job ID:"
'
'chkCompletedYN
'
Me.chkCompleted YN.Location = New System.Drawing. Point(744, 472)
Me.chkCompleted YN.Name = "chkCompletedYN "
Me.chkCompleted YN.Size = New System.Drawing. Size(160, 24)
Me.chkCompleted YN.TabIndex = 13
Me.chkCompleted YN.Tag = ""
Me.chkCompleted YN.Text = "Job Completed"
'
'chkApprovedYN
'
Me.chkApprovedY N.Location = New System.Drawing. Point(744, 448)
Me.chkApprovedY N.Name = "chkApprove dYN"
Me.chkApprovedY N.Size = New System.Drawing. Size(160, 24)
Me.chkApprovedY N.TabIndex = 12
Me.chkApprovedY N.Tag = ""
Me.chkApprovedY N.Text = "Approved for Programming"
'
'labUserNote
'
Me.labUserNote. Location = New System.Drawing. Point(328, 568)
Me.labUserNote. Name = "labUserNot e"
Me.labUserNote. Size = New System.Drawing. Size(64, 23)
Me.labUserNote. TabIndex = 10
Me.labUserNote. Tag = ""
Me.labUserNote. Text = "User Note:"
'
'labReferenceJo bNumber
'
Me.labReference JobNumber.Locat ion = New System.Drawing. Point(8, 448)
Me.labReference JobNumber.Name = "labReferenceJo bNumber"
Me.labReference JobNumber.TabIn dex = 8
Me.labReference JobNumber.Tag = ""
Me.labReference JobNumber.Text = "Job Ref. Num. :"
'
'txtJobDescript ion
'
Me.txtJobDescri ption.BackColor = System.Drawing. SystemColors.In fo
Me.MsdnTextboxV alidator1.SetCu stomValidationE nabled(Me.txtJo bDescription,
True)
Me.MsdnTextboxV alidator1.SetDa taType(Me.txtJo bDescription,
MSDNTextboxVali dator.DataTypeC onstants.String Type)
Me.MsdnTextboxV alidator1.SetDi splayName(Me.tx tJobDescription ,
"JobDescription ")
Me.txtJobDescri ption.Location = New System.Drawing. Point(120, 424)
Me.MsdnTextboxV alidator1.SetMa xValue(Me.txtJo bDescription, "")
Me.MsdnTextboxV alidator1.SetMi nValue(Me.txtJo bDescription, "")
Me.txtJobDescri ption.Name = "txtJobDescript ion"
Me.MsdnTextboxV alidator1.SetRe gularExpression (Me.txtJobDescr iption,
"")
Me.MsdnTextboxV alidator1.SetRe quired(Me.txtJo bDescription, False)
Me.txtJobDescri ption.Size = New System.Drawing. Size(300, 20)
Me.txtJobDescri ption.TabIndex = 7
Me.txtJobDescri ption.Tag = ""
Me.txtJobDescri ption.Text = ""
Me.ToolTip1.Set ToolTip(Me.txtJ obDescription, "Please enter a maximum
of 75 letters.")
'
'labJobDescript ion
'
Me.labJobDescri ption.Location = New System.Drawing. Point(8, 424)
Me.labJobDescri ption.Name = "labJobDescript ion"
Me.labJobDescri ption.TabIndex = 6
Me.labJobDescri ption.Tag = ""
Me.labJobDescri ption.Text = "Job Description:"
'
'labCustomerNam e
'
Me.labCustomerN ame.Location = New System.Drawing. Point(8, 400)
Me.labCustomerN ame.Name = "labCustomerNam e"
Me.labCustomerN ame.TabIndex = 4
Me.labCustomerN ame.Tag = ""
Me.labCustomerN ame.Text = "Customer Name:"
'
'labJobNumber
'
Me.labJobNumber .Location = New System.Drawing. Point(8, 376)
Me.labJobNumber .Name = "labJobNumb er"
Me.labJobNumber .TabIndex = 2
Me.labJobNumber .Tag = ""
Me.labJobNumber .Text = "Job Number:"
'
'txtJobNumber
'
Me.txtJobNumber .BackColor = System.Drawing. SystemColors.In fo
Me.MsdnTextboxV alidator1.SetCu stomValidationE nabled(Me.txtJo bNumber,
True)
Me.MsdnTextboxV alidator1.SetDa taType(Me.txtJo bNumber,
MSDNTextboxVali dator.DataTypeC onstants.String Type)
Me.MsdnTextboxV alidator1.SetDi splayName(Me.tx tJobNumber, "JobNumber" )
Me.txtJobNumber .Location = New System.Drawing. Point(120, 376)
Me.MsdnTextboxV alidator1.SetMa xValue(Me.txtJo bNumber, "")
Me.MsdnTextboxV alidator1.SetMi nValue(Me.txtJo bNumber, "")
Me.txtJobNumber .Name = "txtJobNumb er"
Me.MsdnTextboxV alidator1.SetRe gularExpression (Me.txtJobNumbe r,
"^[a-zA-Z]{1,3}[0-9]{4}$")
Me.MsdnTextboxV alidator1.SetRe quired(Me.txtJo bNumber, False)
Me.txtJobNumber .TabIndex = 3
Me.txtJobNumber .Tag = ""
Me.txtJobNumber .Text = ""
Me.ToolTip1.Set ToolTip(Me.txtJ obNumber, "Please enter a pattern of
1-3 letters and 4 numbers.")
'
'txtUserNote
'
Me.txtUserNote. BackColor = System.Drawing. SystemColors.Wi ndow
Me.MsdnTextboxV alidator1.SetCu stomValidationE nabled(Me.txtUs erNote,
True)
Me.MsdnTextboxV alidator1.SetDa taType(Me.txtUs erNote,
MSDNTextboxVali dator.DataTypeC onstants.String Type)
Me.MsdnTextboxV alidator1.SetDi splayName(Me.tx tUserNote, "")
Me.txtUserNote. Location = New System.Drawing. Point(392, 568)
Me.MsdnTextboxV alidator1.SetMa xValue(Me.txtUs erNote, "")
Me.MsdnTextboxV alidator1.SetMi nValue(Me.txtUs erNote, "")
Me.txtUserNote. Multiline = True
Me.txtUserNote. Name = "txtUserNot e"
Me.MsdnTextboxV alidator1.SetRe gularExpression (Me.txtUserNote , "")
Me.MsdnTextboxV alidator1.SetRe quired(Me.txtUs erNote, False)
Me.txtUserNote. Size = New System.Drawing. Size(300, 40)
Me.txtUserNote. TabIndex = 11
Me.txtUserNote. Tag = ""
Me.txtUserNote. Text = ""
Me.ToolTip1.Set ToolTip(Me.txtU serNote, "Users notes such what
information might need verification.")
'
'grpSystemServi ces
'
Me.grpSystemSer vices.Controls. Add(Me.chkHasCi rcuitBreakersYN )
Me.grpSystemSer vices.Controls. Add(Me.txtSyste mAmps)
Me.grpSystemSer vices.Controls. Add(Me.labSyste mAmps)
Me.grpSystemSer vices.Controls. Add(Me.cboSyste mPhase)
Me.grpSystemSer vices.Controls. Add(Me.labSyste mPhase)
Me.grpSystemSer vices.Controls. Add(Me.cboSyste mVoltage)
Me.grpSystemSer vices.Controls. Add(Me.labSyste mVoltage)
Me.grpSystemSer vices.Controls. Add(Me.txtShopP SI)
Me.grpSystemSer vices.Controls. Add(Me.labShopP si)
Me.grpSystemSer vices.Location = New System.Drawing. Point(432, 368)
Me.grpSystemSer vices.Name = "grpSystemServi ces"
Me.grpSystemSer vices.Size = New System.Drawing. Size(304, 152)
Me.grpSystemSer vices.TabIndex = 9
Me.grpSystemSer vices.TabStop = False
Me.grpSystemSer vices.Tag = ""
Me.grpSystemSer vices.Text = "System Services"
'
'chkHasCircuitB reakersYN
'
Me.chkHasCircui tBreakersYN.Loc ation = New System.Drawing. Point(120,
120)
Me.chkHasCircui tBreakersYN.Nam e = "chkHasCircuitB reakersYN"
Me.chkHasCircui tBreakersYN.Siz e = New System.Drawing. Size(176, 24)
Me.chkHasCircui tBreakersYN.Tab Index = 8
Me.chkHasCircui tBreakersYN.Tex t = "Circuit Brakers (Fuses default)"
'
'txtSystemAmps
'
Me.txtSystemAmp s.BackColor = System.Drawing. SystemColors.In fo
Me.MsdnTextboxV alidator1.SetCu stomValidationE nabled(Me.txtSy stemAmps,
True)
Me.MsdnTextboxV alidator1.SetDa taType(Me.txtSy stemAmps,
MSDNTextboxVali dator.DataTypeC onstants.Int16T ype)
Me.MsdnTextboxV alidator1.SetDi splayName(Me.tx tSystemAmps,
"SystemAmps ")
Me.txtSystemAmp s.Location = New System.Drawing. Point(120, 96)
Me.MsdnTextboxV alidator1.SetMa xValue(Me.txtSy stemAmps, "999")
Me.MsdnTextboxV alidator1.SetMi nValue(Me.txtSy stemAmps, "0")
Me.txtSystemAmp s.Name = "txtSystemA mps"
Me.MsdnTextboxV alidator1.SetRe gularExpression (Me.txtSystemAm ps, "")
Me.MsdnTextboxV alidator1.SetRe quired(Me.txtSy stemAmps, False)
Me.txtSystemAmp s.TabIndex = 7
Me.txtSystemAmp s.Text = ""
Me.ToolTip1.Set ToolTip(Me.txtS ystemAmps, "Please enter an Integer
between 0 and 999.")
'
'labSystemAmps
'
Me.labSystemAmp s.Location = New System.Drawing. Point(8, 96)
Me.labSystemAmp s.Name = "labSystemA mps"
Me.labSystemAmp s.TabIndex = 6
Me.labSystemAmp s.Text = "System Amps"
'
'cboSystemPhase
'
Me.cboSystemPha se.DropDownStyl e =
System.Windows. Forms.ComboBoxS tyle.DropDownLi st
Me.cboSystemPha se.Location = New System.Drawing. Point(120, 72)
Me.cboSystemPha se.Name = "cboSystemPhase "
Me.cboSystemPha se.Size = New System.Drawing. Size(121, 21)
Me.cboSystemPha se.TabIndex = 5
'
'labSystemPhase
'
Me.labSystemPha se.Location = New System.Drawing. Point(8, 72)
Me.labSystemPha se.Name = "labSystemPhase "
Me.labSystemPha se.TabIndex = 4
Me.labSystemPha se.Text = "System Phase:"
'
'cboSystemVolta ge
'
Me.cboSystemVol tage.DropDownSt yle =
System.Windows. Forms.ComboBoxS tyle.DropDownLi st
Me.cboSystemVol tage.Location = New System.Drawing. Point(120, 48)
Me.cboSystemVol tage.Name = "cboSystemVolta ge"
Me.cboSystemVol tage.Size = New System.Drawing. Size(72, 21)
Me.cboSystemVol tage.TabIndex = 3
'
'labSystemVolta ge
'
Me.labSystemVol tage.Location = New System.Drawing. Point(8, 48)
Me.labSystemVol tage.Name = "labSystemVolta ge"
Me.labSystemVol tage.TabIndex = 2
Me.labSystemVol tage.Text = "System Voltage:"
'
'txtShopPSI
'
Me.txtShopPSI.B ackColor = System.Drawing. SystemColors.In fo
Me.MsdnTextboxV alidator1.SetCu stomValidationE nabled(Me.txtSh opPSI,
True)
Me.MsdnTextboxV alidator1.SetDa taType(Me.txtSh opPSI,
MSDNTextboxVali dator.DataTypeC onstants.Int16T ype)
Me.MsdnTextboxV alidator1.SetDi splayName(Me.tx tShopPSI, "ShipPSI")
Me.txtShopPSI.L ocation = New System.Drawing. Point(120, 24)
Me.MsdnTextboxV alidator1.SetMa xValue(Me.txtSh opPSI, "999")
Me.MsdnTextboxV alidator1.SetMi nValue(Me.txtSh opPSI, "0")
Me.txtShopPSI.N ame = "txtShopPSI "
Me.MsdnTextboxV alidator1.SetRe gularExpression (Me.txtShopPSI, "")
Me.MsdnTextboxV alidator1.SetRe quired(Me.txtSh opPSI, False)
Me.txtShopPSI.T abIndex = 1
Me.txtShopPSI.T ag = "DataEntry"
Me.txtShopPSI.T ext = ""
Me.ToolTip1.Set ToolTip(Me.txtS hopPSI, "Please enter an Integer
between 0 and 999.")
'
'labShopPsi
'
Me.labShopPsi.L ocation = New System.Drawing. Point(8, 24)
Me.labShopPsi.N ame = "labShopPsi "
Me.labShopPsi.T abIndex = 0
Me.labShopPsi.T ag = "DataEntry"
Me.labShopPsi.T ext = "Shop PSI (80):"
'
'chkIsMasterYN
'
Me.chkIsMasterY N.Location = New System.Drawing. Point(744, 496)
Me.chkIsMasterY N.Name = "chkIsMaste rYN"
Me.chkIsMasterY N.Size = New System.Drawing. Size(160, 24)
Me.chkIsMasterY N.TabIndex = 14
Me.chkIsMasterY N.Tag = ""
Me.chkIsMasterY N.Text = "This Job is the Master"
'
'lblReferenceJo bNumber
'
Me.lblReference JobNumber.Borde rStyle =
System.Windows. Forms.BorderSty le.Fixed3D
Me.lblReference JobNumber.Locat ion = New System.Drawing. Point(120,
448)
Me.lblReference JobNumber.Name = "lblReferenceJo bNumber"
Me.lblReference JobNumber.TabIn dex = 9
Me.lblReference JobNumber.Tag = ""
'
'chkAllProcesse sAddedYN
'
Me.chkAllProces sesAddedYN.Enab led = False
Me.chkAllProces sesAddedYN.Loca tion = New System.Drawing. Point(744,
376)
Me.chkAllProces sesAddedYN.Name = "chkAllProcesse sAddedYN"
Me.chkAllProces sesAddedYN.Size = New System.Drawing. Size(160, 24)
Me.chkAllProces sesAddedYN.TabI ndex = 26
Me.chkAllProces sesAddedYN.Tag = ""
Me.chkAllProces sesAddedYN.Text = "All Processes Added"
'
'chkAllProcesse sConfiguredYN
'
Me.chkAllProces sesConfiguredYN .Enabled = False
Me.chkAllProces sesConfiguredYN .Location = New
System.Drawing. Point(744, 424)
Me.chkAllProces sesConfiguredYN .Name = "chkAllProcesse sConfiguredYN"
Me.chkAllProces sesConfiguredYN .Size = New System.Drawing. Size(160,
24)
Me.chkAllProces sesConfiguredYN .TabIndex = 27
Me.chkAllProces sesConfiguredYN .Tag = ""
Me.chkAllProces sesConfiguredYN .Text = "All Processes Configured"
'
'chkArchive
'
Me.chkArchive.L ocation = New System.Drawing. Point(744, 520)
Me.chkArchive.N ame = "chkArchive "
Me.chkArchive.S ize = New System.Drawing. Size(160, 24)
Me.chkArchive.T abIndex = 28
Me.chkArchive.T ag = ""
Me.chkArchive.T ext = "Archive (hide)"
'
'txtCustomerNam e
'
Me.txtCustomerN ame.BackColor = System.Drawing. SystemColors.In fo
Me.MsdnTextboxV alidator1.SetCu stomValidationE nabled(Me.txtCu stomerName,
True)
Me.MsdnTextboxV alidator1.SetDa taType(Me.txtCu stomerName,
MSDNTextboxVali dator.DataTypeC onstants.String Type)
Me.MsdnTextboxV alidator1.SetDi splayName(Me.tx tCustomerName,
"CustomerNa me")
Me.txtCustomerN ame.Location = New System.Drawing. Point(120, 400)
Me.txtCustomerN ame.MaxLength = 36
Me.MsdnTextboxV alidator1.SetMa xValue(Me.txtCu stomerName, "")
Me.MsdnTextboxV alidator1.SetMi nValue(Me.txtCu stomerName, "")
Me.txtCustomerN ame.Name = "txtCustomerNam e"
Me.MsdnTextboxV alidator1.SetRe gularExpression (Me.txtCustomer Name, "")
Me.MsdnTextboxV alidator1.SetRe quired(Me.txtCu stomerName, False)
Me.txtCustomerN ame.Size = New System.Drawing. Size(200, 20)
Me.txtCustomerN ame.TabIndex = 35
Me.txtCustomerN ame.Tag = ""
Me.txtCustomerN ame.Text = ""
Me.ToolTip1.Set ToolTip(Me.txtC ustomerName, "Please enter a maximum of
36 letters.")
'
'lblCountOfJobs
'
Me.lblCountOfJo bs.BorderStyle =
System.Windows. Forms.BorderSty le.Fixed3D
Me.lblCountOfJo bs.ForeColor = System.Drawing. SystemColors.Gr ayText
Me.lblCountOfJo bs.Location = New System.Drawing. Point(120, 328)
Me.lblCountOfJo bs.Name = "lblCountOfJobs "
Me.lblCountOfJo bs.Size = New System.Drawing. Size(100, 16)
Me.lblCountOfJo bs.TabIndex = 33
'
'labTotalJobs
'
Me.labTotalJobs .Location = New System.Drawing. Point(8, 328)
Me.labTotalJobs .Name = "labTotalJo bs"
Me.labTotalJobs .Size = New System.Drawing. Size(100, 16)
Me.labTotalJobs .TabIndex = 32
Me.labTotalJobs .Text = "Total Jobs:"
'
'chkAllTasksAdd edYN
'
Me.chkAllTasksA ddedYN.Enabled = False
Me.chkAllTasksA ddedYN.Location = New System.Drawing. Point(744, 400)
Me.chkAllTasksA ddedYN.Name = "chkAllTasksAdd edYN"
Me.chkAllTasksA ddedYN.Size = New System.Drawing. Size(160, 24)
Me.chkAllTasksA ddedYN.TabIndex = 34
Me.chkAllTasksA ddedYN.Text = "All Tasks Added"
'
'MsdnTextboxVal idator1
'
Me.MsdnTextboxV alidator1.Displ ayControl = Nothing
Me.MsdnTextboxV alidator1.Error Provider = Me.ErrorProvide r1
Me.MsdnTextboxV alidator1.Inval idBackColor =
System.Drawing. Color.FromArgb( CType(192, Byte), CType(192, Byte),
CType(255, Byte))
Me.MsdnTextboxV alidator1.Toolt ipProvider = Nothing
'
'ErrorProvider1
'
Me.ErrorProvide r1.ContainerCon trol = Me
'
'txtEditedBy
'
Me.MsdnTextboxV alidator1.SetCu stomValidationE nabled(Me.txtEd itedBy,
True)
Me.MsdnTextboxV alidator1.SetDa taType(Me.txtEd itedBy,
MSDNTextboxVali dator.DataTypeC onstants.String Type)
Me.MsdnTextboxV alidator1.SetDi splayName(Me.tx tEditedBy, "")
Me.txtEditedBy. Location = New System.Drawing. Point(120, 552)
Me.MsdnTextboxV alidator1.SetMa xValue(Me.txtEd itedBy, "")
Me.MsdnTextboxV alidator1.SetMi nValue(Me.txtEd itedBy, "")
Me.txtEditedBy. Name = "txtEditedB y"
Me.MsdnTextboxV alidator1.SetRe gularExpression (Me.txtEditedBy , "")
Me.MsdnTextboxV alidator1.SetRe quired(Me.txtEd itedBy, False)
Me.txtEditedBy. TabIndex = 72
Me.txtEditedBy. Tag = "RecordDoc"
Me.txtEditedBy. Text = ""
'
'txtEditedOn
'
Me.MsdnTextboxV alidator1.SetCu stomValidationE nabled(Me.txtEd itedOn,
True)
Me.MsdnTextboxV alidator1.SetDa taType(Me.txtEd itedOn,
MSDNTextboxVali dator.DataTypeC onstants.String Type)
Me.MsdnTextboxV alidator1.SetDi splayName(Me.tx tEditedOn, "")
Me.txtEditedOn. Location = New System.Drawing. Point(120, 528)
Me.MsdnTextboxV alidator1.SetMa xValue(Me.txtEd itedOn, "")
Me.MsdnTextboxV alidator1.SetMi nValue(Me.txtEd itedOn, "")
Me.txtEditedOn. Name = "txtEditedO n"
Me.MsdnTextboxV alidator1.SetRe gularExpression (Me.txtEditedOn , "")
Me.MsdnTextboxV alidator1.SetRe quired(Me.txtEd itedOn, False)
Me.txtEditedOn. Size = New System.Drawing. Size(150, 20)
Me.txtEditedOn. TabIndex = 70
Me.txtEditedOn. Tag = "RecordDoc"
Me.txtEditedOn. Text = ""
'
'txtCreatedBy
'
Me.MsdnTextboxV alidator1.SetCu stomValidationE nabled(Me.txtCr eatedBy,
True)
Me.MsdnTextboxV alidator1.SetDa taType(Me.txtCr eatedBy,
MSDNTextboxVali dator.DataTypeC onstants.String Type)
Me.MsdnTextboxV alidator1.SetDi splayName(Me.tx tCreatedBy, "")
Me.txtCreatedBy .Location = New System.Drawing. Point(120, 504)
Me.MsdnTextboxV alidator1.SetMa xValue(Me.txtCr eatedBy, "")
Me.MsdnTextboxV alidator1.SetMi nValue(Me.txtCr eatedBy, "")
Me.txtCreatedBy .Name = "txtCreated By"
Me.MsdnTextboxV alidator1.SetRe gularExpression (Me.txtCreatedB y, "")
Me.MsdnTextboxV alidator1.SetRe quired(Me.txtCr eatedBy, False)
Me.txtCreatedBy .TabIndex = 68
Me.txtCreatedBy .Tag = "RecordDoc"
Me.txtCreatedBy .Text = ""
'
'txtCreatedOn
'
Me.MsdnTextboxV alidator1.SetCu stomValidationE nabled(Me.txtCr eatedOn,
True)
Me.MsdnTextboxV alidator1.SetDa taType(Me.txtCr eatedOn,
MSDNTextboxVali dator.DataTypeC onstants.String Type)
Me.MsdnTextboxV alidator1.SetDi splayName(Me.tx tCreatedOn, "")
Me.txtCreatedOn .Location = New System.Drawing. Point(120, 480)
Me.MsdnTextboxV alidator1.SetMa xValue(Me.txtCr eatedOn, "")
Me.MsdnTextboxV alidator1.SetMi nValue(Me.txtCr eatedOn, "")
Me.txtCreatedOn .Name = "txtCreated On"
Me.MsdnTextboxV alidator1.SetRe gularExpression (Me.txtCreatedO n, "")
Me.MsdnTextboxV alidator1.SetRe quired(Me.txtCr eatedOn, False)
Me.txtCreatedOn .Size = New System.Drawing. Size(150, 20)
Me.txtCreatedOn .TabIndex = 66
Me.txtCreatedOn .Tag = "RecordDoc"
Me.txtCreatedOn .Text = ""
'
'lblCountOfConf igured
'
Me.lblCountOfCo nfigured.Border Style =
System.Windows. Forms.BorderSty le.Fixed3D
Me.lblCountOfCo nfigured.ForeCo lor =
System.Drawing. SystemColors.Gr ayText
Me.lblCountOfCo nfigured.Locati on = New System.Drawing. Point(352, 328)
Me.lblCountOfCo nfigured.Name = "lblCountOfConf igured"
Me.lblCountOfCo nfigured.Size = New System.Drawing. Size(100, 16)
Me.lblCountOfCo nfigured.TabInd ex = 37
'
'labTotalConfig ured
'
Me.labTotalConf igured.Location = New System.Drawing. Point(240, 328)
Me.labTotalConf igured.Name = "labTotalConfig ured"
Me.labTotalConf igured.Size = New System.Drawing. Size(100, 16)
Me.labTotalConf igured.TabIndex = 36
Me.labTotalConf igured.Text = "Total Configured:"
'
'Button1
'
Me.Button1.Loca tion = New System.Drawing. Point(320, 480)
Me.Button1.Name = "Button1"
Me.Button1.TabI ndex = 38
Me.Button1.Text = "Button1"
'
'Button2
'
Me.Button2.Loca tion = New System.Drawing. Point(320, 512)
Me.Button2.Name = "Button2"
Me.Button2.TabI ndex = 39
Me.Button2.Text = "Button2"
'
'btnExit
'
Me.btnExit.Loca tion = New System.Drawing. Point(848, 584)
Me.btnExit.Name = "btnExit"
Me.btnExit.TabI ndex = 63
Me.btnExit.Text = "Close"
'
'labEditedBy
'
Me.labEditedBy. Location = New System.Drawing. Point(8, 552)
Me.labEditedBy. Name = "labEditedB y"
Me.labEditedBy. TabIndex = 71
Me.labEditedBy. Tag = "RecordDoc"
Me.labEditedBy. Text = "Edited By:"
'
'labEditedOn
'
Me.labEditedOn. Location = New System.Drawing. Point(8, 528)
Me.labEditedOn. Name = "labEditedO n"
Me.labEditedOn. TabIndex = 69
Me.labEditedOn. Tag = "RecordDoc"
Me.labEditedOn. Text = "Edited On:"
'
'labCreatedBy
'
Me.labCreatedBy .Location = New System.Drawing. Point(8, 504)
Me.labCreatedBy .Name = "labCreated By"
Me.labCreatedBy .TabIndex = 67
Me.labCreatedBy .Tag = "RecordDoc"
Me.labCreatedBy .Text = "Created By:"
'
'labCreatedOn
'
Me.labCreatedOn .Location = New System.Drawing. Point(8, 480)
Me.labCreatedOn .Name = "labCreated On"
Me.labCreatedOn .TabIndex = 65
Me.labCreatedOn .Tag = "RecordDoc"
Me.labCreatedOn .Text = "Created On:"
'
'DataGrid1
'
Me.DataGrid1.Da taMember = ""
Me.DataGrid1.He aderForeColor =
System.Drawing. SystemColors.Co ntrolText
Me.DataGrid1.Lo cation = New System.Drawing. Point(8, 120)
Me.DataGrid1.Na me = "DataGrid1"
Me.DataGrid1.Si ze = New System.Drawing. Size(920, 200)
Me.DataGrid1.Ta bIndex = 0
'
'f010Jobs
'
Me.AutoScaleBas eSize = New System.Drawing. Size(5, 13)
Me.ClientSize = New System.Drawing. Size(944, 644)
Me.Controls.Add (Me.txtEditedBy )
Me.Controls.Add (Me.txtEditedOn )
Me.Controls.Add (Me.txtCreatedB y)
Me.Controls.Add (Me.txtCreatedO n)
Me.Controls.Add (Me.labEditedBy )
Me.Controls.Add (Me.labEditedOn )
Me.Controls.Add (Me.labCreatedB y)
Me.Controls.Add (Me.labCreatedO n)
Me.Controls.Add (Me.DataGrid1)
Me.Controls.Add (Me.btnExit)
Me.Controls.Add (Me.Button2)
Me.Controls.Add (Me.Button1)
Me.Controls.Add (Me.lblCountOfC onfigured)
Me.Controls.Add (Me.labTotalCon figured)
Me.Controls.Add (Me.txtCustomer Name)
Me.Controls.Add (Me.chkAllTasks AddedYN)
Me.Controls.Add (Me.lblCountOfJ obs)
Me.Controls.Add (Me.labTotalJob s)
Me.Controls.Add (Me.chkArchive)
Me.Controls.Add (Me.chkAllProce ssesConfiguredY N)
Me.Controls.Add (Me.chkAllProce ssesAddedYN)
Me.Controls.Add (Me.lblReferenc eJobNumber)
Me.Controls.Add (Me.chkIsMaster YN)
Me.Controls.Add (Me.grpSystemSe rvices)
Me.Controls.Add (Me.txtUserNote )
Me.Controls.Add (Me.txtJobNumbe r)
Me.Controls.Add (Me.lblpkJobId)
Me.Controls.Add (Me.labJobId)
Me.Controls.Add (Me.chkComplete dYN)
Me.Controls.Add (Me.chkApproved YN)
Me.Controls.Add (Me.labUserNote )
Me.Controls.Add (Me.labReferenc eJobNumber)
Me.Controls.Add (Me.txtJobDescr iption)
Me.Controls.Add (Me.labJobDescr iption)
Me.Controls.Add (Me.labCustomer Name)
Me.Controls.Add (Me.labJobNumbe r)
Me.Name = "f010Jobs"
Me.Text = "f010Jobs"
Me.grpSystemSer vices.ResumeLay out(False)
CType(Me.DataGr id1,
System.Componen tModel.ISupport Initialize).End Init()
Me.ResumeLayout (False)

End Sub

#End Region

Protected DAL As New CLIP.DataAccess
Protected _dataSet1 As CLIP.dsTables
Protected _currentTable As String
Protected _dt As DataTable

Protected WithEvents _bmb As BindingManagerB ase

'ComboBox Control
Private _bStillPopulati ngCboVoltage As Boolean = True
Private _bStillPopulati ngCboPhase As Boolean = True

Protected Sub DataGrid1_Curre ntCellChanged(B yVal sender As Object,
ByVal e As System.EventArg s) Handles DataGrid1.Curre ntCellChanged
_bmb.Position = DataGrid1.Curre ntCell.RowNumbe r
End Sub

Private Sub Form_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

Me._dataSet1 = New CLIP.dsTables

_currentTable = "tbl010Job"
_dt = _dataSet1.tbl01 0Job

Call FillDataSet()
Call SetBindings()

End Sub

Private Sub FillDataSet()
DAL.sqlConn.Ope n()
DAL.da104Voltag e_Cbo.Fill(_dat aSet1, "lkp104Voltage" )
DAL.da102Phase_ Cbo.Fill(_dataS et1, "lkp102Phas e")
DAL.da010JobFrm .Fill(_dataSet1 , "tbl010Job" )
DAL.sqlConn.Clo se()
DAL.sqlConn.Clo se()
End Sub

Private Sub SetBindings()

'[ComboBox]
Me.cboSystemVol tage.DataSource = _dataSet1
Me.cboSystemVol tage.DisplayMem ber = "lkp104Voltage. Voltage"
Me.cboSystemVol tage.ValueMembe r = "lkp104Voltage. pkVoltageId"

Me.cboSystemPha se.DataSource = _dataSet1
Me.cboSystemPha se.DisplayMembe r = "lkp102Phase.Ph ase"
Me.cboSystemPha se.ValueMember = "lkp102Phase.pk PhaseId"

'[DataGrid]
Me.DataGrid1.Da taMember = "tbl010Job"
Me.DataGrid1.Da taSource = _dataSet1

'[Controls]
Me.lblpkJobId.D ataBindings.Add ("Text", _dt, "pkJobId")
Me.txtJobNumber .DataBindings.A dd("Text", _dt, "JobNumber" )
Me.txtCustomerN ame.DataBinding s.Add("Text", _dt, "CustomerNa me")
Me.txtJobDescri ption.DataBindi ngs.Add("Text", _dt, "JobDescription ")
Me.lblReference JobNumber.DataB indings.Add("Te xt", _dt,
"ReferenceJobNu mber")

Me.txtShopPSI.D ataBindings.Add ("Text", _dt, "ShopPsi")
Me.cboSystemVol tage.DataBindin gs.Add("Selecte dValue", _dt,
"SystemVoltage" )
Me.cboSystemPha se.DataBindings .Add("SelectedV alue", _dt,
"SystemPhas e")
Me.txtSystemAmp s.DataBindings. Add("Text", _dt, "SystemAmps ")
Me.chkHasCircui tBreakersYN.Dat aBindings.Add(" Checked", _dt,
"HasCircuitBrea kersYN")

Me.chkAllProces sesAddedYN.Data Bindings.Add("C hecked", _dt,
"AllProcessesAd dedYN")
Me.chkAllTasksA ddedYN.DataBind ings.Add("Check ed", _dt,
"AllTasksAddedY N")
Me.chkAllProces sesConfiguredYN .DataBindings.A dd("Checked", _dt,
"AllProcessesCo nfiguredYN")
Me.chkApprovedY N.DataBindings. Add("Checked", _dt, "ApprovedYN ")
Me.chkCompleted YN.DataBindings .Add("Checked", _dt, "CompletedY N")
Me.chkIsMasterY N.DataBindings. Add("Checked", _dt, "IsMasterYN ")
Me.chkArchive.D ataBindings.Add ("Checked", _dt, "Archive")

Me.txtUserNote. DataBindings.Ad d("Text", _dt, "jcUserNote ")
Me.txtCreatedOn .DataBindings.A dd("Text", _dt, "jcCreatedO n")
Me.txtCreatedBy .DataBindings.A dd("Text", _dt, "jcCreatedB y")
Me.txtEditedOn. DataBindings.Ad d("Text", _dt, "jcEditedOn ")
Me.txtEditedBy. DataBindings.Ad d("Text", _dt, "jcEditedBy ")

'[BindingContext]
_bmb = Me.BindingConte xt(_dt)
_bmb.Position = 0

End Sub

Private Sub btnExit_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnExit.Click
Me.Close()
End Sub

End Class
//

=============== =======
2.) Here are (3) Data Tables (1 data table, two lookups)
\\
CREATE TABLE [tbl010Job] (
[pkJobId] [char] (36) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS NOT NULL
CONSTRAINT [DF_tbl010JobCus tomer_pkJobId] DEFAULT (newid()),
[JobNumber] [varchar] (7) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS NOT
NULL ,
[CustomerName] [varchar] (25) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS NOT
NULL ,
[JobDescription] [varchar] (75) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS
NOT NULL ,
[ReferenceJobNum ber] [varchar] (7) COLLATE
SQL_Latin1_Gene ral_CP1_CI_AS NULL ,
[ShopPsi] [tinyint] NULL ,
[SystemVoltage] [int] NULL ,
[SystemPhase] [int] NULL ,
[SystemAmps] [varchar] (3) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS NULL ,
[HasCircuitBreak ersYN] [bit] NOT NULL CONSTRAINT
[DF_tbl010Job_Ha sCircuitBreaker sYN] DEFAULT (0),
[AllProcessesAdd edYN] [bit] NOT NULL CONSTRAINT
[DF_tbl010Job_Al lProcessesPrese ntYN] DEFAULT (0),
[AllProcessesCon figuredYN] [bit] NOT NULL CONSTRAINT
[DF_tbl010Job_Al lChildConfigsCo mpleteYN] DEFAULT (0),
[ApprovedYN] [bit] NOT NULL CONSTRAINT [DF_tbl010Job_Ap provedYN]
DEFAULT (0),
[CompletedYN] [bit] NOT NULL CONSTRAINT [DF_tbl010Job_Co mpletedYN]
DEFAULT (0),
[IsMasterYN] [bit] NOT NULL CONSTRAINT [DF_tbl010Job_Is MasterYN]
DEFAULT (0),
[Archive] [bit] NOT NULL CONSTRAINT [DF_tbl010Job_AR CHIVE] DEFAULT
(0),
[jcUserNote] [varchar] (100) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS NOT
NULL ,
[jcCreatedOn] [smalldatetime] NOT NULL ,
[jcCreatedBy] [varchar] (25) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS NOT
NULL ,
[jcEditedOn] [smalldatetime] NOT NULL ,
[jcEditedBy] [varchar] (25) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS NOT
NULL ,
[jcrowversion] [timestamp] NOT NULL ,
[AllTasksAddedYN] [bit] NOT NULL CONSTRAINT
[DF_tbl010Job_Al lTasksAddedYN] DEFAULT (0),
CONSTRAINT [PK_tbl010Job] PRIMARY KEY CLUSTERED
(
[pkJobId]
) ON [PRIMARY]
) ON [PRIMARY]
GO
//

\\
CREATE TABLE [lkp102Phase] (
[pkPhaseId] [int] IDENTITY (1, 1) NOT NULL ,
[Phase] [varchar] (50) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS NOT NULL ,
[Ord] [tinyint] NOT NULL CONSTRAINT [DF_lkp102Phase_ ord] DEFAULT (0),
[Hide] [bit] NOT NULL CONSTRAINT [DF_lkp102Phase_ hide] DEFAULT (0),
CONSTRAINT [PK_lkp102Phase] PRIMARY KEY CLUSTERED
(
[pkPhaseId]
) ON [PRIMARY]
) ON [PRIMARY]
GO
//

\\
CREATE TABLE [lkp104Voltage] (
[pkVoltageId] [int] IDENTITY (1, 1) NOT NULL ,
[Voltage] [varchar] (3) COLLATE SQL_Latin1_Gene ral_CP1_CI_AS NOT NULL
,
[Ord] [tinyint] NOT NULL CONSTRAINT [DF_lkp104Voltag e_ord] DEFAULT
(0),
[Hide] [bit] NOT NULL CONSTRAINT [DF_lkp104Voltag e_hide] DEFAULT (0),
CONSTRAINT [PK_lkp104Voltag e] PRIMARY KEY CLUSTERED
(
[pkVoltageId]
) ON [PRIMARY]
) ON [PRIMARY]
GO
//

=============== =======
3.) Here is sample data

\\
pkJobId,JobNumb er,CustomerName ,JobDescription ,ReferenceJobNu mber,ShopPsi,Sy stemVoltage,Sys temPhase,System Amps,HasCircuit BreakersYN,AllP rocessesAddedYN ,AllProcessesCo nfiguredYN,Appr ovedYN,Complete dYN,IsMasterYN, Archive,jcUserN ote,jcCreatedOn ,jcCreatedBy,jc EditedOn,jcEdit edBy,jcrowversi on,AllTasksAdde dYN
166aba12-e302-4e1e-9723-299ed9a40aad,P1 161,Plastech,DC X RH/LH A Piller
Cap
Clip,,75,2,3,10 0,TRUE,FALSE,FA LSE,FALSE,FALSE ,FALSE,FALSE,,9/1/2005,dbuchanan, 9/6/2005,dbuchanan, 00000000000163D E,FALSE
582E2CC9-BCDF-49C4-ACE1-3697DEF54A53,F1 136,Frax,To this do
that,,,,,,FALSE ,FALSE,FALSE,FA LSE,FALSE,FALSE ,FALSE,,9/12/2005,db,9/12/2005,db,0000000 00001641C,FALSE
5F8E9720-4C24-47AF-B7E1-7168784BE30A,G1 137,Graxton,Som ething
else,,,,,,FALSE ,FALSE,FALSE,FA LSE,FALSE,FALSE ,FALSE,,9/12/2005,db,9/12/2005,db,0000000 00001641E,FALSE
//

lkp102Phase
\\
1,DC,1,0
2,1-Pase,2,0
3,2-Phase,3,0
4,3-Phase,4,0
//

lkp104Voltage
\\
1,24,1,0
2,120,2,0
3,240,3,0
4,480,4,0
5,500,5,0
//

=============== =======
4.) Here is the data set (dsTables.vb)
\\
Public Class dsTables
Inherits DataSet

'[DataTables]
Friend tbl010Job As New DataTable
Friend lkp102Phase As New DataTable
Friend lkp104Voltage As New DataTable

'[Constructor]
Public Sub New()
MyBase.New()
Call InitializeCompo nent()
End Sub

'[Initialize class component]
Private Sub InitializeCompo nent()

'[Add Tables to the DataSet]
Me.tbl010Job = Me.Tables.Add(" tbl010Job")
Me.lkp102Phase = Me.Tables.Add(" lkp102Phase")
Me.lkp104Voltag e = Me.Tables.Add(" lkp104Voltage")

'[Add Columns to the DataTables]

' tbl010Job
Dim pkJobId As DataColumn = Me.tbl010Job.Co lumns.Add("pkJo bId",
GetType(String) ) : pkJobId.MaxLeng th = 36 : pkJobId.AllowDB Null = False
Dim JobNumber As DataColumn =
Me.tbl010Job.Co lumns.Add("JobN umber", GetType(String) ) :
JobNumber.MaxLe ngth = 7 : JobNumber.Allow DBNull = False
Dim CustomerName As DataColumn =
Me.tbl010Job.Co lumns.Add("Cust omerName", GetType(String) ) :
CustomerName.Ma xLength = 25 : CustomerName.Al lowDBNull = False
Dim JobDescription As DataColumn =
Me.tbl010Job.Co lumns.Add("JobD escription", GetType(String) ) :
JobDescription. MaxLength = 75 : JobDescription. AllowDBNull = False
Dim ReferenceJobNum ber As DataColumn =
Me.tbl010Job.Co lumns.Add("Refe renceJobNumber" , GetType(String) ) :
ReferenceJobNum ber.MaxLength = 7 : ReferenceJobNum ber.AllowDBNull =
True

Dim ShopPsi As DataColumn = Me.tbl010Job.Co lumns.Add("Shop Psi",
GetType(Byte)) : ShopPsi.AllowDB Null = True 'ShopPsi.Defaul tValue = 80
'Would this send the value to a new row? 'TODO - dsTables -
DatsColumn.Defa ultValue
Dim SystemVoltage As DataColumn =
Me.tbl010Job.Co lumns.Add("Syst emVoltage", GetType(Int32)) :
SystemVoltage.A llowDBNull = True
Dim SystemPhase As DataColumn =
Me.tbl010Job.Co lumns.Add("Syst emPhase", GetType(Int32)) :
SystemPhase.All owDBNull = True
Dim SystemAmps As DataColumn =
Me.tbl010Job.Co lumns.Add("Syst emAmps", GetType(String) ) :
SystemAmps.MaxL ength = 3 : SystemAmps.Allo wDBNull = True
Dim HasCircuitBreak ersYN As DataColumn =
Me.tbl010Job.Co lumns.Add("HasC ircuitBreakersY N", GetType(Boolean )) :
HasCircuitBreak ersYN.AllowDBNu ll = False

Dim AllProcessesAdd edYN As DataColumn =
Me.tbl010Job.Co lumns.Add("AllP rocessesAddedYN ", GetType(Boolean )) :
AllProcessesAdd edYN.AllowDBNul l = False
Dim AllTasksAddedYN As DataColumn =
Me.tbl010Job.Co lumns.Add("AllT asksAddedYN", GetType(Boolean )) :
AllTasksAddedYN .AllowDBNull = False
Dim AllProcessesCon figuredYN As DataColumn =
Me.tbl010Job.Co lumns.Add("AllP rocessesConfigu redYN", GetType(Boolean ))
: AllProcessesCon figuredYN.Allow DBNull = False
Dim ApprovedYN As DataColumn =
Me.tbl010Job.Co lumns.Add("Appr ovedYN", GetType(Boolean )) :
ApprovedYN.Allo wDBNull = False
Dim CompletedYN As DataColumn =
Me.tbl010Job.Co lumns.Add("Comp letedYN", GetType(Boolean )) :
CompletedYN.All owDBNull = False
Dim IsMasterYN As DataColumn =
Me.tbl010Job.Co lumns.Add("IsMa sterYN", GetType(Boolean )) :
IsMasterYN.Allo wDBNull = False
Dim Archive As DataColumn = Me.tbl010Job.Co lumns.Add("Arch ive",
GetType(Boolean )) : Archive.AllowDB Null = False

Dim jcUserNote As DataColumn = Me.tbl010Job.Co lumns.Add("jcUs erNote",
GetType(String) ) : jcUserNote.MaxL ength = 100 : jcUserNote.Allo wDBNull
= False
Dim jcCreatedOn As DataColumn =
Me.tbl010Job.Co lumns.Add("jcCr eatedOn", GetType(DateTim e)) :
jcCreatedOn.All owDBNull = False
Dim jcCreatedBy As DataColumn =
Me.tbl010Job.Co lumns.Add("jcCr eatedBy", GetType(String) ) :
jcCreatedBy.Max Length = 25 : jcCreatedBy.All owDBNull = False
Dim jcEditedOn As DataColumn =
Me.tbl010Job.Co lumns.Add("jcEd itedOn", GetType(DateTim e)) :
jcEditedOn.Allo wDBNull = False
Dim jcEditedBy As DataColumn = Me.tbl010Job.Co lumns.Add("jcEd itedBy",
GetType(String) ) : jcEditedBy.MaxL ength = 25 : jcEditedBy.Allo wDBNull =
False

Dim jcrowversion As DataColumn =
Me.tbl010Job.Co lumns.Add("jcro wversion", GetType(Byte()) ) :
jcrowversion.Al lowDBNull = True

' lkp102Phase
Dim pkPhaseId As DataColumn = Me.lkp102Phase. Columns.Add("pk PhaseId",
GetType(Int32)) : pkPhaseId.Allow DBNull = False
Dim Phase As DataColumn = Me.lkp102Phase. Columns.Add("Ph ase",
GetType(String) ) : Phase.MaxLength = 50 : Phase.AllowDBNu ll = False
Dim Ord102 As DataColumn = Me.lkp102Phase. Columns.Add("Or d",
GetType(Byte)) : Ord102.AllowDBN ull = False
Dim Hide102 As DataColumn = Me.lkp102Phase. Columns.Add("Hi de",
GetType(Boolean )) : Hide102.AllowDB Null = False

' lkp104Voltage
Dim pkVoltageId As DataColumn =
Me.lkp104Voltag e.Columns.Add(" pkVoltageId", GetType(Int32)) :
pkVoltageId.All owDBNull = False
Dim Voltage As DataColumn = Me.lkp104Voltag e.Columns.Add(" Voltage",
GetType(String) ) : Voltage.MaxLeng th = 3 : Voltage.AllowDB Null = False
Dim Ord104 As DataColumn = Me.lkp104Voltag e.Columns.Add(" Ord",
GetType(Byte)) : Ord104.AllowDBN ull = False
Dim Hide104 As DataColumn =
Me.lkp104Voltag e.Columns.Add(" Hide", GetType(Boolean )) :
Hide104.AllowDB Null = False

'[Simple PK Constraints - (one line)]
tbl010Job.Prima ryKey = New DataColumn()
{tbl010Job.Colu mns("pkJobID")}
lkp102Phase.Pri maryKey = New DataColumn()
{lkp102Phase.Co lumns("pkPhaseI d")}
lkp104Voltage.P rimaryKey = New DataColumn()
{lkp104Voltage. Columns("pkVolt ageId")}

End Sub

End Class
//

=============== =======
5.) Here is the Data Access code (DataAccess.vb)

\\
Imports System.Data.Sql Client

Imports System.Data.Com mon
Imports System.Configur ation

Public Class DataAccess
' This class is used to for full access to the main tables
' tbl010Job
' tbl020Proc
' tbl030Devi [2]
' tbl040Cmpt [7] [8] ~ use the same commands, but supply different
Stored Procedures

'This class is also used for access to the lookup tables for
comboBoxes
'See the other DataAccess Class named DataAccessLkpAd min for code
' that allows administrative select, update, insert and delete on
those tables.

#Region " Variables - [ Connection | DataAdapters ] "

'=== [Connection] =============== =============== ===
Friend sqlConn As New SqlConnection

'=== [DataAdapters] =============== =============== =
Friend da010JobFrm As New SqlDataAdapter 'uses 'usp_Job_selVol tPhase'

'For ComboBoxes
Friend da102Phase_Cbo As New SqlDataAdapter ' for select only
Friend da104Voltage_Cb o As New SqlDataAdapter ' for select only

'=== [Commands] =============== ===============
Private Cmd010JobFrm_Se l As New SqlCommand
Private Cmd010JobFrm_In s As New SqlCommand
Private Cmd010JobFrm_Up d As New SqlCommand
Private Cmd010JobFrm_De l As New SqlCommand

'=== [Commands - ComboBoxes] =============== =========
Private Cmd102Phase_Sel As New SqlCommand
Private Cmd104Voltage_S el As New SqlCommand

#End Region

'[Constructor]
Public Sub New()
MyBase.New()
Call InitializeCompo nent()
End Sub

#Region " InitializeCompo nent - [ Instantiate (Connection,
DataAdapters, Commands), Give value (Connection String)] "

<System.Diagnos tics.DebuggerSt epThrough()> _
Private Sub InitializeCompo nent()

'=== [Connection String] =============== =========

Dim connectionStrin g As String
connectionStrin g =
ConfigurationSe ttings.AppSetti ngs("Connection String")
Me.sqlConn.Conn ectionString = connectionStrin g

'=== [Set Cmds - Forms] =============== =======

With da010JobFrm
.SelectCommand = Cmd010JobFrm_Se l
.InsertCommand = Cmd010JobFrm_In s
.UpdateCommand = Cmd010JobFrm_Up d
.DeleteCommand = Cmd010JobFrm_De l
End With

'=== [Set Cmds - ComboBoxes] =============== =

da102Phase_Cbo. SelectCommand = Cmd102Phase_Sel
da104Voltage_Cb o.SelectCommand = Cmd104Voltage_S el

'### da010JobFrm ############### ###
'Select
With Cmd010JobFrm_Se l
.CommandType = CommandType.Sto redProcedure
.CommandText = "usp_Job_sel_Vo ltPhase"
.Connection = sqlConn
With Cmd010JobFrm_Se l.Parameters
.Add(New SqlParameter("@ RETURN_VALUE", SqlDbType.Int, 4,
ParameterDirect ion.ReturnValue , False, CType(0, Byte), CType(0, Byte),
"", DataRowVersion. Current, Nothing))
End With
End With

'%%% da102Phase_Cbo %%%%%%%%%%%%%%% %%
'Select
With Cmd102Phase_Sel
.CommandType = CommandType.Sto redProcedure
.CommandText = "usp_102Phase_s el_cbo"
.Connection = sqlConn
With Cmd102Phase_Sel .Parameters
.Add(New SqlParameter("@ RETURN_VALUE", SqlDbType.Int, 4,
ParameterDirect ion.ReturnValue , False, CType(0, Byte), CType(0, Byte),
"", DataRowVersion. Current, Nothing))
End With
End With

'%%% da104Voltage_Cb o %%%%%%%%%%%%%%% %
'Select
With Cmd104Voltage_S el
.CommandType = CommandType.Sto redProcedure
.CommandText = "usp_104Voltage _sel_cbo"
.Connection = sqlConn
With Cmd104Voltage_S el.Parameters
.Add(New SqlParameter("@ RETURN_VALUE", SqlDbType.Int, 4,
ParameterDirect ion.ReturnValue , False, CType(0, Byte), CType(0, Byte),
"", DataRowVersion. Current, Nothing))
End With
End With

End Sub

#End Region

End Class
//

=============== =======
6.) Here are (3) stored procedures

"usp_Job_sel_Vo ltPhase"
\\
CREATE PROCEDURE dbo.usp_Job_sel _VoltPhase
AS SET NOCOUNT ON;
SELECT
j.pkJobId,
j.JobNumber,
j.CustomerName,
j.JobDescriptio n,
j.ShopPsi,
j.SystemVoltage ,
v.Voltage,
j.SystemPhase,
ph.Phase,
j.SystemAmps,
j.HasCircuitBre akersYN,
j.ReferenceJobN umber,

j.AllProcessesA ddedYN,
j.AllProcessesC onfiguredYN,
j.AllTasksAdded YN,
j.ApprovedYN,
j.CompletedYN,
j.IsMasterYN,
j.Archive,

j.jcUserNote,
j.jcCreatedOn,
j.jcCreatedBy,
j.jcEditedOn,
j.jcEditedBy,
j.jcrowversion

FROM
tbl010Job j
-- INNER JOIN lkp104Voltage v ON j.SystemVoltage = v. pkVoltageId
-- INNER JOIN lkp102Phase ph ON j.SystemPhase = ph. pkPhaseId
LEFT OUTER JOIN lkp104Voltage v ON j.SystemVoltage = v. pkVoltageId
LEFT OUTER JOIN lkp102Phase ph ON j.SystemPhase = ph. pkPhaseId

ORDER BY j.jcCreatedOn DESC

GO
//

"usp_102Phase_s el_cbo"
\\
CREATE PROCEDURE dbo.usp_102Phas e_sel_cbo
AS
SET NOCOUNT ON;
SELECT
pkPhaseId,
Phase,
Ord,
Hide
FROM lkp102Phase
WHERE (Hide = 0)
Order By Ord, Phase

GO
//

"usp_104Voltage _sel_cbo"
\\
CREATE PROCEDURE dbo.usp_104Volt age_sel_cbo
AS
SET NOCOUNT ON;
SELECT
pkVoltageId,
Voltage,
Ord,
Hide
FROM lkp104Voltage
WHERE (Hide = 0)
ORDER BY Ord, Voltage

GO
//

Thank you for taking a look at this

Nov 21 '05 #6
Hi,

"dbuchanan" <db*********@ho tmail.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
Not sure what you mean in number 5.
Here is what I mean by number 5...
This variable is created;

Protected WithEvents _bmb As BindingManagerB ase

Then just after the controls binding I do this;
_bmb = Me.BindingConte xt(_dt)


Nothing wrong with storing a CurrencyManager , but for the connection between
DataGrid<->ComboBox, you don't need to handle any events. You are adding a
Binding to the ComboBox for SelectedValue, aren't you ?
What version of framework are you using ? DotNet framework 1.1.4322 SP1
Visual Studio 2003 Version 7.1.3088


Same here.
Maybe you could post the entire code that reproduces this problem ? I'll try to do this within a day.


Since a basic example seems to work for me, i can't say alot without seeing
any code.

hth,
Greetings

Nov 21 '05 #7
Hi Bart,

I sent my code earlier today. You should have it by now look above.

dbuchanan,
Thank you

Nov 21 '05 #8
Hi,

"dbuchanan" <db*********@ho tmail.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
Hi Bart,
Maybe you could post the entire code that reproduces this problem ?


Here is the entire code necessary to reproduce the problem. (It is
simplified to contain only the code necessary)


First of all, you are correct that binding to lookup ComboBox's causes
problems with null values, i should have seen this earlier.

The main reason for this problem is that the ComboBox's have their own
CurrencyManager which mantain position. The position of a CurrencyManager
can not be -1 (no item selected), but the SelectedIndex of a ComboBox can
be -1 (no item selected). That's causing a conflict.
This first time the Position of the CurrencyManager will go to 0 instead
of -1, but since it has changed, the ComboBox sees this and updates its
SelectedIndex from -1 to 0. The second time it doesn't matter anymore, the
CurrencyManager stays at 0, doesn't fire any changing events and the
SelectedIndex of the ComboBox can stay at -1.

All that's left is a workaround, but first a correction:

1) I see that you are handling a cell changed event, you needed to do this
because the DataSource of the DataGrid and the Controls aren't exactly the
same.
Remove the cell changed event :

'Protected Sub DataGrid1_Curre ntCellChanged(B yVal sender As Object,
' ByVal e As System.EventArg s) Handles DataGrid1.Curre ntCellChanged
' _bmb.Position = DataGrid1.Curre ntCell.RowNumbe r
' End Sub

Then it is important to bind the DataGrid and your Controls to the same
DataSource, let's use _dt:

Private Sub SetBindings()
'[ComboBox]
' .... no need to change ....

'[DataGrid - using _dt ]
Me.DataGrid1.Da taSource = _dt ' CHANGED

'[Controls - using _dt ]
Me.lblpkJobId.D ataBindings.Add ("Text", _dt, "pkJobId")
' ....

'[BindingContext - using _dt ]
_bmb = Me.BindingConte xt( _dt )

End Sub

Now the DataGrid and the Controls will navigate together without handling
the cell changed event.
2) A workaround for the null value problem:

Add the following code to the form, which handles the PositionChanged event
for the CurrencyManager you declared (_bmb) :

Private Sub _bmb_PositionCh anged(ByVal sender As Object, ByVal e As
System.EventArg s) Handles _bmb.PositionCh anged
'
Dim lv As DataRowView = _
DirectCast(_bmb .Current, DataRowView)

Dim cbs() As ComboBox = _
New ComboBox() {cboSystemPhase , cboSystemVoltag e}

For Each cbo As ComboBox In cbs
If
(lv(cbo.DataBin dings("Selected Value").Binding MemberInfo.Bind ingField) Is
DBNull.Value) And _
(cbo.SelectedIn dex <> -1) Then
cbo.SelectedInd ex = -1
End If
Next
End Sub
hth,
Greetings
Nov 21 '05 #9
Hi Bart,

Thank you.I have implemented your suggestions and they work!

I have a question about the positon changed method in an environment of
inheritance. I use Protected Overridable in my base class and Protected
Overrides in my derived classes when I set my bindings. Is there a way
to implement _bmb_PositionCh anged as a Protected Overridable and use
Protected Overrides to bring in the different combo boxes in the
derived forms. I don'e know how to do this when I already have method
parameters. For now I have a separate copy of the method in each of my
eight derived classes. I believe there should be a more practical way.

dbuchanan,
Thanks

Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2481
by: Chandra | last post by:
Hello Sir, This is Chandra and Working as Software Engineer. I got a really weird problem with ComboBoxes. I have set the ComboBox DroppedDown Property to true. Now the actual problem is When the ComboBox DroppedDown is Shown I have to actually click twice to get out of the form or need to click twice to do anything.
7
8500
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way of doing it. I have a table with products, tblProducts, some of them are Active while others are Inactive. The form shows all the products purchased by a customer, both Active and Inactive in a ComboBox, cbProducts. My client wants to view all...
8
12082
by: Zlatko Matiæ | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the combobox. What is the solution? Thank you in advance.
1
2489
by: anonymous | last post by:
I've been trying to put a them, please help me out. Here's the major parts of my code: public Form1() { DataSet myDataSet = new DataSet("myDataSet"); DataTable testTable = new DataTable("table"); testTable.Columns.Add("Col1", typeof(Int32)); testTable.Columns.Add("Col2", typeof(String)); testTable.Rows.Add(testTable.NewRow());
3
6817
by: TT (Tom Tempelaere) | last post by:
Hay there, I'm writing my own DataGridComboBoxColumn because .NET 1.1 does not have one (I hope .NET 2.0 supplies one). I based it on this article: http://msdn.microsoft.com/msdnmag/issues/03/08/DataGrids/default.aspx I have a problem when there are two DataGrid's on one form, and when I switch focus from one grid to the other. To be more precise, when I'm editing a combo box column in one grid, and then click in the combo column of...
0
2366
by: tupolev | last post by:
Hi, I already post this item but now I know whats wrong: I want to allow the user to edit the items in a combobox. The problem is that the textchange event works just one time (for the first changed letter) because he reset the selectedindex of the combobox to -1. In debug mode I can't see where he does this. How can I solve this? My code sofar: contactlijst is a structure and the volgnummer is the index of the item in the combobox
4
3996
by: Keith | last post by:
Hello - this started out as a minor annoyance - and now is starting to bother me more and more - I'm hoping someone can help me. I would like to have a combobox display - NOT initially be blank - but contain a value. However the value is just for user reference - not really one of the combobox choices. For example intially the combobox should equal the word Select - and the item values can be say 'one', 'two', and 'three'.
0
407
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a corresponding field in the lookup table. In my data table we store the ID in what I will call the 'key' field. == Description of the desired operation:
4
4606
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box bound to a table as a lookup, drawing values from another table to populate the available selections. This all worked fine in VB6. I have distilled the problem down to a simple form drawing data from the Northwind database for a representative...
0
8004
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7934
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8425
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8418
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8071
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8288
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
3958
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2438
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1271
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.