timed
Newcomer
Databinding to a maskedit control
I am having trouble tring to databind information from a dataset that is created and enter it in a maskedit box. When I bind the information to the textboxes evreything is fine it is when i get to the maskedit boxes is where I get the error, any sugestions. Thanks in Advance. I am a beginer to .net
The error that I am reciving is a
An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll
Additional information: Cannot bind to property or column Phone2 on DataSource.
Here is the code
'Lets bind the data from the DataSet
txtId.DataBindings.Add("Text", dsClients.Tables(0), "iClientID" & "")
txtAddress.DataBindings.Add("Text", dsClients.Tables(0), "cAddress")
txtMiddle.DataBindings.Add("Text", dsClients.Tables(0), "cMiddleName")
txtCity.DataBindings.Add("Text", dsClients.Tables(0), "cCity")
txtState.DataBindings.Add("Text", dsClients.Tables(0), "cState")
txtZip.DataBindings.Add("Text", dsClients.Tables(0), "cZip")
mskPhone.DataBindings.Add("MaskText", dsClients.Tables(0), "cPhone")
mskPhone2.DataBindings.Add("Text", dsClients.Tables(0), "Phone2")
mskSSN.DataBindings.Add("Text", dsClients.Tables(0), "cSSN")
txtNotes.DataBindings.Add("Text", dsClients.Tables(0), "cNotes")
I am having trouble tring to databind information from a dataset that is created and enter it in a maskedit box. When I bind the information to the textboxes evreything is fine it is when i get to the maskedit boxes is where I get the error, any sugestions. Thanks in Advance. I am a beginer to .net
The error that I am reciving is a
An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll
Additional information: Cannot bind to property or column Phone2 on DataSource.
Here is the code
'Lets bind the data from the DataSet
txtId.DataBindings.Add("Text", dsClients.Tables(0), "iClientID" & "")
txtAddress.DataBindings.Add("Text", dsClients.Tables(0), "cAddress")
txtMiddle.DataBindings.Add("Text", dsClients.Tables(0), "cMiddleName")
txtCity.DataBindings.Add("Text", dsClients.Tables(0), "cCity")
txtState.DataBindings.Add("Text", dsClients.Tables(0), "cState")
txtZip.DataBindings.Add("Text", dsClients.Tables(0), "cZip")
mskPhone.DataBindings.Add("MaskText", dsClients.Tables(0), "cPhone")
mskPhone2.DataBindings.Add("Text", dsClients.Tables(0), "Phone2")
mskSSN.DataBindings.Add("Text", dsClients.Tables(0), "cSSN")
txtNotes.DataBindings.Add("Text", dsClients.Tables(0), "cNotes")