EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jbuttafuoco on January 16, 2019, 11:28:57 AM



Title: treegrid onClickRow give javascript error
Post by: jbuttafuoco on January 16, 2019, 11:28:57 AM
I have a treegrid which is working fine.  Now I need to click (or double click) on a row to popup a form.  When I add

onClickRow: function(row) { alert('hello world'); },

I get the following in the JS console

[Error] TypeError: null is not an object (evaluating 'row[field]')
   clickEventHandler (jquery.easyui.all.js:13755)
   clickEventHandler (jquery.easyui.all.js:16788)
   dispatch (jquery-3.2.1.min.js:3:10322)

Any ideas?

Jim


Title: Re: treegrid onClickRow give javascript error
Post by: stworthy on January 16, 2019, 11:27:22 PM
No problems, this code works fine.
Code:
$('#tg').treegrid({
onClickRow: function(row){
console.log(row)
}
})