I want to make a checkbox automatically checked when first opened
The properties are as follows:
thankyou..
Hi,
Checkbox selection depends on the value of variable IsSelected, as mentioned in screenshot. So now if you want it should be selected on initially then simply set default value of IsSelected to true.
regards
where should I change it?
In tableRecordsPopupCommercialPricing. If you can provide screenshot of aggregate then can suggest further.
i cant find the agregat. how to find agregat?
could you please share the oml file.
ohh i cant. are you willing to join the link gmeet for a while, thankyou...https://meet.google.com/tad-sssm-aex
Hii
you can use JavaScript apply and resolve this issue
document.addEventListener("DOMContentLoaded", function () { // This code will run when the page is fully loaded and ready to be manipulated // Get a reference to the checkbox element var checkbox = document.getElementById("myCheckbox"); // Check the checkbox checkbox.checked = true; });
sorry, I'm not using javascript
hi Marhta Batubara,
i looked at your problem just add one attribute to each record for example is selected, and on after fetch action just set the values of isselected = true in the loop and after applying this you will see all check box button will be selected in start always.
Thanks and regardsPrince
Hi @Marhta Batubara
I saw your binding , Que to you are you saving Isseleted value in data base ? when it will be true ?
If it is always true do this -- IsSelected attribute value is false in your data base due to that it is showing you all checkboxes are not selected what you do make default value True of that attribute.
Hope this will work for you if not Kindly share the OML
Regards.
Hi Martha,
Based on your screenshot, it seems the checkbox default value is coming from aggregate of PopupCommercialPricing.
And based on your question, you want to change this, so when the page is opened, the default will always checked ?
If so, then after you fetch the PopupCommercialPricing, you can overwrite the value isSelected by using afterfetch or onReady event, and overwrite the isSelected value in the list with true.
Set the value of isSelected as true in the OnAfterFetch of the aggregate.
tableRecordsPopupCommercialPricing is your aggregate and you can find the OnAfterFetch in its properties on bottom right side.