Skip to content

Instantly share code, notes, and snippets.

@NickersF
Created February 7, 2024 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NickersF/cda19881bee7a65406c9e2f441792966 to your computer and use it in GitHub Desktop.
Save NickersF/cda19881bee7a65406c9e2f441792966 to your computer and use it in GitHub Desktop.
Save And Add New For Child Grids
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