This topic is locked
[SOLVED]

 Hide "Show Details" Link/Icon

4/25/2019 7:09:11 PM
ASPRunner.NET General questions
I
i.NoLim author

I have a master table called "Expenditures and Encumbrances" and child table called "Releases." I would like for the "Show Details" link/icon to show only when the "Transaction Type" in "Expenditures and Encumbrances" is equal to "Encumbrances."
For testing purposes I tried all of the following in the "JavaScript OnLoad event" but no luck, any help will be appreciated.



var id = "details-badge badge Releases_badge";

var button = $("[id^=" + id + "]");

Runner.addDisabledClass(button);
var id = "details_29_Releases";

var button = $("[id^=" + id + "]");

Runner.addDisabledClass(button);
var id = "glyphicon glyphicon-th-list";

var button = $("[id^=" + id + "]");

Runner.addDisabledClass(button);
var id = "grid_details_link";

var button = $("[id^=" + id + "]");

Runner.addDisabledClass(button);






image uploader

T
Tim 4/26/2019

I think you can do this in the "List page: After record processed" event.

if (data["TransactionType"].ToString() == "Encumbrances") {

pageObject.hideItem("grid_details_link");

}


I think this would work. If you're using version 10.x you can easily find the ID of the details link element, but what I have above is the default name if there is only one link (I think).
Good luck.

Tim

I
i.NoLim author 4/26/2019



I think you can do this in the "List page: After record processed" event.

if (data["TransactionType"].ToString() == "Encumbrances") {

pageObject.hideItem("grid_details_link");

}


I think this would work. If you're using version 10.x you can easily find the ID of the details link element, but what I have above is the default name if there is only one link (I think).
Good luck.

Tim


Thank you very much! You steered me in the right direction, I just had to add "recordId" to hide the ones I wanted. As it is, the code hides all "Show Details" icons.
Working code:

if (data["TransactionType"].ToString() ==  "Expenditure") {

pageObject.hideItem("grid_details_link", recordId);

}


Thank you again.