HI,
If the delete checkbox is check in a subgrid, I want the corresponding line to be hightlighed red and and also disabled. That makes it easier to visually see that a line is marked for deletion. Is it possible to do this with JavaScript?
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
When delete checkbox checked...
Re: When delete checkbox checked...
amit,
A Lookup Object has a clickdelete event.
https://wiki.nubuilder.cloud/ ... ustom_Code
Try changing background color here.
Steven
A Lookup Object has a clickdelete event.
https://wiki.nubuilder.cloud/ ... ustom_Code
Try changing background color here.
Steven
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: When delete checkbox checked...
As Steven suggested, add a clickdelete event to your Subform Object.
Then, in your Form's Custom Code field add this JavaScript to cross out and turn the text red of a row that is marked to delete:
Then, in your Form's Custom Code field add this JavaScript to cross out and turn the text red of a row that is marked to delete:
Code: Select all
function deleteClicked(event) {
var id = event.target.id;
var sf = "sfObj"; //<----- replace with your Subform Object ID !
var row = id.substring(sf.length, sf.length + 3);
style = $('#' + id).is(":checked") ? {
'color': 'red'
, 'text-decoration': 'line-through'
} : {
'color': 'black'
, 'text-decoration': 'none'
};
$('[id^=' + sf + nuPad3(row) + ']').css(style);
}
You do not have the required permissions to view the files attached to this post.