Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
475
<ig:gridClientEvents cellClicked="zap"> Pass invalid object to the javascript function
posted

Hi,

I use cellClicked event exactly as the on-line demo (CSOM) example. In my event hanlder zap():

function zap(sender, args)

{

var cell = new IgGridCell(args.get_browserEvent().target);
var line = cell.getRowIndex();

}

I need the cell's row index (line). The function zap() is called when user click on any cell in the grid.

But if user click on the text in a cell, 

var line = cell.getrowIndex()

will throw exception, because the cell object doesn't have the function getrowIndex().

If user click on any where outside the text. The function will work, you can get the row index. 

 The column is defined as:

<ig:column sortBy="lastName">
     <h:outputText value="#{DATA_ROW.LastName}"></h:outputText>
    <f:facet name="header">
       <h:outputText value="Last Name"></h:outputText>
   </f:facet>
</ig:column>

just like the excample in the demo.

I have tested a couple of days and cannot find way around it.

I think the "args" passed into zap() function is different depending where you click in a cell.

I have NetAdvantage 9.0 installed. I don't know why I don't see the same problem in your on-line demo.

I also download and installed the examples came with the NetAdvantage, and I cannot get the same

function work.

Please help.

 

Thanks,

 

Yan