wangxuebin Posted July 11, 2014 Posted July 11, 2014 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! Quote
Sherzod Posted July 11, 2014 Posted July 11, 2014 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. 1 Quote
wangxuebin Posted July 12, 2014 Author Posted July 12, 2014 thanks! Both ways works! Best regards! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.