Jump to content

How I get the text value of the cell of Unidbgrid when I click the cell?


wangxuebin

Recommended Posts

Hi wxb_km. 
 
Basically, your question should be solved as follows: 

 

1. Need to use the function 

cellclick(sender, metaData, td, cellIndex, record, tr, rowIndex, e, eOpts)

2. Here cellIndex - is the column index and rowIndex - the index of the row. http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.View-event-cellclick

 

3. And use it to get the value:

sender.store.getAt(rowIndex).get(cellIndex)

i.e.:

function cellclick(sender, metaData, td, cellIndex, record, tr, rowIndex, e, eOpts)
{  
  alert(sender.store.getAt(rowIndex).get(cellIndex));
} 
But in my case (I use UniGUI 0.94.0.1023, under certain circumstances), I think some of the variables swapped
For me works if I do so:
function cellclick(sender, metaData, td, cellIndex, record, tr, rowIndex, e, eOpts)
{ 
  alert(sender.store.getAt(tr).get(td));
} 

Try...

 

Best regards.

  • Upvote 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...