Created
February 7, 2024 21:25
-
-
Save NickersF/cda19881bee7a65406c9e2f441792966 to your computer and use it in GitHub Desktop.
Save And Add New For Child Grids
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(`#AddChildGridRow_Btn_${curGridName.split('_')[1]}`); | |
let childGridAddRecordBtnEl = $(`#AddChildGridRow_Btn_${curGridName.split('_')[1]}`); | |
console.log(childGridAddRecordBtnEl); | |
setTimeout(function () { | |
if (childGridAddRecordBtnEl.length === 0) { | |
console.log("parent grid case"); | |
$(`${curGridName}AddGridRow_Btn`).trigger("click")[0]; | |
} else { | |
console.log("child grid case"); | |
childGridAddRecordBtnEl.trigger("click")[0]; | |
} | |
// if ($(`#AddChildGridRow_Btn_${curGridName.split('_')[1]}`) != undefined) { | |
// console.log("parent grid case"); | |
// $(`${curGridName}AddGridRow_Btn`).trigger("click")[0]; | |
// } else { | |
// console.log("child grid case"); | |
// $(`#AddChildGridRow_Btn_${curGridName.split('_')[1]}`).trigger("click")[0]; | |
// } | |
}, 1300); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment