datawindow
datawindow
(OP)
Dear Sir/Madam,
I just wanted to seek help in creating a datawindow (dw_4) with the following requirements.
1) this datawindow consists of 3 columns ("acctno","name","age")
2) this table is intended to store a kids database (eg: how many kids do you have)
3) this datawindow is located in tabpage_3 (tabpage_3.dw_4)
scenario:
initially, this datawindow will display a single row. Now, if you have more than 1 kids and you are in the last column "age" when you hit [Enter] again a new row will be provided because of the dw_4.InsertRow(0) command. Let's say you have 2 or 3 kids and after encoding the details you are now ready to click the save button. Please take note that since these kids (2-3) belong to the same parent, the datawindow did not include the column "acctno".
Now the error upon clicking the save button was "accntno in table cannot be null". This is where I need help. couldn't figure out what approach to code the commands... Or if you have any simpler and easier suggestions on how to do it, I will really appreciate it.
Thank you.

I just wanted to seek help in creating a datawindow (dw_4) with the following requirements.
1) this datawindow consists of 3 columns ("acctno","name","age")
2) this table is intended to store a kids database (eg: how many kids do you have)
3) this datawindow is located in tabpage_3 (tabpage_3.dw_4)
scenario:
initially, this datawindow will display a single row. Now, if you have more than 1 kids and you are in the last column "age" when you hit [Enter] again a new row will be provided because of the dw_4.InsertRow(0) command. Let's say you have 2 or 3 kids and after encoding the details you are now ready to click the save button. Please take note that since these kids (2-3) belong to the same parent, the datawindow did not include the column "acctno".
Now the error upon clicking the save button was "accntno in table cannot be null". This is where I need help. couldn't figure out what approach to code the commands... Or if you have any simpler and easier suggestions on how to do it, I will really appreciate it.
Thank you.

RE: datawindow
RE: datawindow
i think you just have to copied the value from parent datawindow and setitem it everytime insertrow occured
RE: datawindow
RE: datawindow
1) you have to GetItemString() on "account_no" from the tablepage_1 since this is where the information starts. It's up to you if you want to pass the value to a variable that will make the command shorter.
2) you need to SetItem() this "account_no to tablepage_3 where the encoding happens for the kid's information.
3) tab_3.tabpage_3.dw_4.SetItem(1,"account_no",tab_1.tabpage_1.dw_1.GetItemString(1,"account_no") this command should be on your save event.