Hello to all.
I was trying to create an event for, when the user is scrolling in a datagrid and changing lines (moves up and down a datagrid), and finally achieved it:
In the objects header table, I added a new integer field.
I added a special / user panel component in the view with editor: HTML
and code:
<html>
<body>
<script>
var XCon=external;
var counter=0;
setInterval(checkCurrentLine,1000);
function checkCurrentLine(){
var command={data:{CCCRPSTEVALOPTIONS:[{INTCOUNTER:++counter}]}};
XCon.setData(this, JSON.stringify(command),function(scope, resp){});
}
</script>
</body>
</html>
Now the field CCCRPSTEVALOPTIONS.INTCOUNTER
updates every second, so at the
ON_CCCRPSTEVALOPTIONS_INTCOUNTER
function I can make the checks I need and raise my custom event if appropriate
For the time it only works with internet explorer 11 and not with the webview2 option,
but does not take up resources or slows the app.
I used it in a dialog object in S1 Designer, if you want to use it in other views, I think you will have to use the HTMLCODE editor instead of HTML