cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How to add click event in different cell in vuforia studio data grid.

Jay_9621
5-Regular Member

How to add click event in different cell in vuforia studio data grid.

I have a data grid which is bind through thingworx service. I want to add click events in different cells in data grid so that by clicking particular cell we will toggle through another cell.

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions

Hi @Jay_9621 ,

you want to add a click event for the dataGrid Widget  and need to handle the click in Vuforia Studio.

So one possible option is to use the call back (twx.app.fn.clickItemInRepeater). There is another called ($scope.app.fn.clickItemInSelect) which alternatively could be use. I could not remember which was working (or better working) here

e.g. example:

 

//----------------------------------------------------
twx.app.fn.clickItemInRepeater = function(item,list,isMultiSelect)
{

  //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);
  console.log("selection = "+ item.selection);
 
        let r =parseInt(Math.random()*255);
    	let g =parseInt(Math.random()*255);
    	let b =parseInt(Math.random()*255);
    	let a =parseInt(Math.random()*0.8)+0.2;
    $scope.blinkSelection(item.selection,'rgba('+r+','+g+','+b+','+a+')',200,10);
};  

$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);
  
};

 

 The problem is that currently there seems to be issue issue in the Current Vuforia Studio with this widget  which is reported   PTC R&D team as Jira VTS-1469 -,please, see also https://community.ptc.com/t5/Vuforia-Studio/Data-Grid-Widget-Appears-to-not-be-working/td-p/869073

So that with my test project I could not test it until fix is provided (possibly the next release or one release later). Anyway the R&D already fixed the problem but this need to be released soon

View solution in original post

1 REPLY 1

Hi @Jay_9621 ,

you want to add a click event for the dataGrid Widget  and need to handle the click in Vuforia Studio.

So one possible option is to use the call back (twx.app.fn.clickItemInRepeater). There is another called ($scope.app.fn.clickItemInSelect) which alternatively could be use. I could not remember which was working (or better working) here

e.g. example:

 

//----------------------------------------------------
twx.app.fn.clickItemInRepeater = function(item,list,isMultiSelect)
{

  //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);
  console.log("selection = "+ item.selection);
 
        let r =parseInt(Math.random()*255);
    	let g =parseInt(Math.random()*255);
    	let b =parseInt(Math.random()*255);
    	let a =parseInt(Math.random()*0.8)+0.2;
    $scope.blinkSelection(item.selection,'rgba('+r+','+g+','+b+','+a+')',200,10);
};  

$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);
  
};

 

 The problem is that currently there seems to be issue issue in the Current Vuforia Studio with this widget  which is reported   PTC R&D team as Jira VTS-1469 -,please, see also https://community.ptc.com/t5/Vuforia-Studio/Data-Grid-Widget-Appears-to-not-be-working/td-p/869073

So that with my test project I could not test it until fix is provided (possibly the next release or one release later). Anyway the R&D already fixed the problem but this need to be released soon

Announcements

Top Tags