Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Who can I select items in widgets like "select" or "list" via javascript?
I want to achieve something like, click a next button and select the next item in a list.
Can I somehow utilize the "clickitem" event, or simulate a click otherwise to select a specific item in the list?
Solved! Go to Solution.
I found the solution myself.
twx.app.fn.clickItemInRepeater = function(item,list,isMultiSelect);
I found the solution myself.
twx.app.fn.clickItemInRepeater = function(item,list,isMultiSelect);
Fine solution. But to be more understandable for other members I will to add some details
1.) how to find this function if you have no idea where to look for it.
so simple printing of object in the chrome debugging console
e.g.
console.warn($scope.app.fn);
2.) So here we can print first the $scope and from there we can search for some other functionality here $scope.app.fn
Now to check if this work we can define the following functions:
$scope.app.fn.clickItemInRepeater = function(item,list,isMultiSelect) //other name for twx.app { console.log("twx.app.fn.clickItemInRepeater item"); console.warn(item); console.log("twx.app.fn.clickItemInRepeater list"); console.warn(list); console.log("twx.app.fn.clickItemInRepeater isMultiSelect"); console.warn(isMultiSelect); }; $scope.app.fn.clickItemInSelect= function(list,isMultiSelect,value,valueField) { console.log("$scope.app.fn.clickItemInSelect list"); console.warn(list); console.log("$scope.app.fn.clickItemInSelect isMultiSelect"); console.warn(isMultiSelect); console.log("$scope.app.fn.clickItemInSelect value"); console.warn(value); console.log("$scope.app.fn.clickItemInSelect valueField"); console.warn(valueField); };
3.) And test in the console windows of chrome
3.1) clickItemInRepeater funciton for dataGrid and repeater widgets
3.2) and for the slect widget: