ganero
New member
- Joined
- Mar 17, 2011
- Messages
- 3
- Programming Experience
- 1-3
pls help me.
i got stuck this problem for so long, and made me stop programming for six months. now i want to do some programming again but still before i can go on , i must solve my old problem.
it's about object binding, yes it's just a simple binding. but i don't know why it won't work.
for summary, i will write about what i am doing:
1. i have one solution, and have two project in it. WaitressDataWin and WaitressDataObject
2. inside WaitressDataWin, i have 'waitressdata.vb' . this is my simple form , there are some basic textbox (waitress name, address, phone)
3. inside WaitressDataObject, i have 'waitressDataObj.vb' is where i put my object class, i have WaitressName property, WaitressAddress, and Phone.
one of my property is like this, others are same except the name of course.
4. i create data source , that is object data source. i add reference so i can add my second project which is WaitressDataObject and set the WaitressDataObj as the data source. now i have datasource with three properties (WaitressName, WaitressAddress, Phone)
5. I bind my textbox, by dragging the WaitressName (in datasource) to my waitressname textbox .. so on to all my properties.., i also get bindingsourcecomponent, WaitressDataObjectBindingSource
6. then I put this code to my form load :
7. done, it should've been worked, but it didn't , i don't know why.. , every time i fill one of my textbox, the properties didn't set the value, i put breakpoint in the 'set' part of all my properties but it never breaks anyway.. (the 'get' part is good, it read my property value when i load the form). so i just had problem in my 'SET' Part.
8. I think i had checked on my variable (word, case sensitive,etc), no problem.
PLEASE Help me, if you had experience regarding my issue. any kind of help, i'd say thank you very much in advance.
i got stuck this problem for so long, and made me stop programming for six months. now i want to do some programming again but still before i can go on , i must solve my old problem.
it's about object binding, yes it's just a simple binding. but i don't know why it won't work.
for summary, i will write about what i am doing:
1. i have one solution, and have two project in it. WaitressDataWin and WaitressDataObject
2. inside WaitressDataWin, i have 'waitressdata.vb' . this is my simple form , there are some basic textbox (waitress name, address, phone)
3. inside WaitressDataObject, i have 'waitressDataObj.vb' is where i put my object class, i have WaitressName property, WaitressAddress, and Phone.
one of my property is like this, others are same except the name of course.
VB.NET:
Private _WaitressName As String
''' <summary>
''' Gets or sets the Waitress Name
''' </summary>
Public Property WaitressName() As String
Get
Return _WaitressName
End Get
Private Set(ByVal value As String)
_WaitressName = value
End Set
End Property
4. i create data source , that is object data source. i add reference so i can add my second project which is WaitressDataObject and set the WaitressDataObj as the data source. now i have datasource with three properties (WaitressName, WaitressAddress, Phone)
5. I bind my textbox, by dragging the WaitressName (in datasource) to my waitressname textbox .. so on to all my properties.., i also get bindingsourcecomponent, WaitressDataObjectBindingSource
6. then I put this code to my form load :
VB.NET:
dim wdm = new WaitressDataObj
Me.WaitressDataObjectBindingSource.DataSource = wdm
7. done, it should've been worked, but it didn't , i don't know why.. , every time i fill one of my textbox, the properties didn't set the value, i put breakpoint in the 'set' part of all my properties but it never breaks anyway.. (the 'get' part is good, it read my property value when i load the form). so i just had problem in my 'SET' Part.
8. I think i had checked on my variable (word, case sensitive,etc), no problem.
PLEASE Help me, if you had experience regarding my issue. any kind of help, i'd say thank you very much in advance.