Jump to content

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


Recommended Posts

Posted

Hi:

How I get the text value of the cell of Unidbgrid when I click the cell? I want to get the value of cell I clicked in  ExtEvents(client side) not in server side events.

 

thank you in advance!

 

Posted
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...