G
Guest
Hi
I have a datagrid that has a datatable as its datasource
currently the user is allowed to select a row from the datagrid and when they click the OK button, the values of the selected row are bound to textboxes. All the values bind properly except one value (Title
The error i recieve is
Cant bind to property or coloumn Title on datacource. Parameter name: datamembe
this message appears when i click the OK button. The message does not end the application but my binding code does not run
Here is my binding code
Tr
cn.Open(
da.Fill(Guest.dsGuest, "ClientDet"
txtTitle.DataBindings.Clear(
txtForename.DataBindings.Clear(
txtSurname.DataBindings.Clear(
txtaddress.DataBindings.Clear(
txtPostcode.DataBindings.Clear(
txtorganisation.DataBindings.Clear(
txtPhoneNo.DataBindings.Clear(
'display the records in the control
Guest.dsGuest.Tables("ClientDet").Select(
Me.txtTitle.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "Title")
Me.txtForename.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "Forename")
Me.txtSurname.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "SurName")
Me.txtaddress.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "Address")
Me.txtPostcode.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "Postcode")
Me.txtorganisation.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "OrgName")
Me.txtPhoneNo.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "PhoneNo")
'place the values from the controls into the global varible
TBTitle = txtTitl
TBPubFName = txtForenam
TBPubLName = txtSurnam
TBPubAddr = txtaddres
TBPubPCode = txtPostcod
TBPubPhoneNo = txtPhoneN
TBPubOrg = txtorganisatio
LabelExClientID = lblExClientI
Me.Close(
i declare the variables at the top of the form like so
Public Shared TBTitle As TextBo
Public Shared TBPubFName As TextBo
Public Shared TBPubLName As TextBo
Public Shared TBPubAddr As TextBo
Public Shared TBPubPCode As TextBo
Public Shared TBPubPhoneNo As TextBo
Public Shared TBPubOrg As TextBo
can anyone plz hel
I have a datagrid that has a datatable as its datasource
currently the user is allowed to select a row from the datagrid and when they click the OK button, the values of the selected row are bound to textboxes. All the values bind properly except one value (Title
The error i recieve is
Cant bind to property or coloumn Title on datacource. Parameter name: datamembe
this message appears when i click the OK button. The message does not end the application but my binding code does not run
Here is my binding code
Tr
cn.Open(
da.Fill(Guest.dsGuest, "ClientDet"
txtTitle.DataBindings.Clear(
txtForename.DataBindings.Clear(
txtSurname.DataBindings.Clear(
txtaddress.DataBindings.Clear(
txtPostcode.DataBindings.Clear(
txtorganisation.DataBindings.Clear(
txtPhoneNo.DataBindings.Clear(
'display the records in the control
Guest.dsGuest.Tables("ClientDet").Select(
Me.txtTitle.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "Title")
Me.txtForename.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "Forename")
Me.txtSurname.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "SurName")
Me.txtaddress.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "Address")
Me.txtPostcode.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "Postcode")
Me.txtorganisation.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "OrgName")
Me.txtPhoneNo.DataBindings.Add(New Binding("Text", Guest.dsGuest.Tables("ClientDet"), "PhoneNo")
'place the values from the controls into the global varible
TBTitle = txtTitl
TBPubFName = txtForenam
TBPubLName = txtSurnam
TBPubAddr = txtaddres
TBPubPCode = txtPostcod
TBPubPhoneNo = txtPhoneN
TBPubOrg = txtorganisatio
LabelExClientID = lblExClientI
Me.Close(
i declare the variables at the top of the form like so
Public Shared TBTitle As TextBo
Public Shared TBPubFName As TextBo
Public Shared TBPubLName As TextBo
Public Shared TBPubAddr As TextBo
Public Shared TBPubPCode As TextBo
Public Shared TBPubPhoneNo As TextBo
Public Shared TBPubOrg As TextBo
can anyone plz hel