Vote up!
0 Votes
2 Replies

Image 'clicked' in Segment widget

Question asked by Humberto Trinh on Feb 21, 2017 03:28 EST

Hi, We have a segment with 2 images (working as a button). We have configured onTouchEnd event that provides information about the clicked widget and location, but in addition to this, we need to know the row it belongs. For example a message in an alert when you click the first image in the second row of the segment could be: "Clicked image1 in row2" Is there any way to do this? Many thanks.

Kony Answered Certificate
Vote up!
0 votes
Vote down!

I think this can be achieved using context. 

function frmName_onclickImageButton(context){
      var selecteditem = context.widgetInfo.selectedRowItems[0];


First you have to create the function like the example above. Then in the onTouchEnd event you need to select the function and tell it to pass the context. 

Answered by: Feb 22, 2017 06:15 EST
Vote up!
0 votes
Vote down!


We have a sample app on the same requirement like one record contain 2 item on click of the item need to know which record and which item got selected. On this scenario we have published the app in our gitHub, please check the below link.


Replied by: Feb 23, 2017 02:13 EST