[SOLVED] Â Disable Record Editing and Additon of Child Tables |
2/6/2018 7:11:25 PM |
ASPRunner.NET General questions | |
I
i.NoLim author
I have 3 tables: Family, Applicant, Charges. All these tables contain a column called "Status." Their relationship is a follows: |
|
jadachDevClub member 2/7/2018 | |
On the Is Record Editable for your table you can add code similar to this: if (values["Status"] == "Inactive")
XVar data = pageObject.getMasterRecord();
var id = "addButton";
|
I
|
i.NoLim author 2/7/2018 |
On the Is Record Editable for your table you can add code similar to this: if (values["Status"] == "Inactive")
XVar data = pageObject.getMasterRecord();
var id = "addButton";
|
I
|
i.NoLim author 2/8/2018 |
There's is an issue when disabling "Add New" and "Inline Add". If I select an 'Inactive' "Applicant" not only does it disable adding new "Charges" (which is perfect) but it also disables the addition of a new "Family."
|
A
|
Arkie 2/8/2018 |
Take a look at your line of code: |
I
|
i.NoLim author 2/8/2018 |
Take a look at your line of code: string strSQLExists = "select * from dbo.Family where Family_ID='"+values["Family_ID"].ToString()+"' and Status='Inactive'"; ====== It appears to me that you should be comparing the inactive status to the Applicant ID, not the Family ID. Or perhaps even both IDs. Otherwise your code is doing exactly as it is programmed to do. I could be reading this wrong, so just go about your biz and ignore this if I am... <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=84303&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
string strSQLExists = "select * from dbo.Applicant where Applicant_ID='"+data["Applicant_ID"].ToString()+"' and Status='Inactive'";
|