Uncaught TypeError: Cannot read property 'indexOf' of undefined


Hi!, first of all, I must say that I know only the most basic of Javascript, but in my work I was asked to write code to build a grid using dhtmlx. The problem occurs without knowing when I modified something as it worked fine before. I need to display the data from a JSON in a grid and then in a form using onRowSelect. This is the error that it shows:

Uncaught TypeError: Cannot read property ‘indexOf’ of undefined
at Object. (dhtmlx.js:1)
at Object.a.callEvent (dhtmlx.js:1)
at window..init (dhtmlx.js:1)
at listUsersInit (listUsers.js:1290)
at listUsers.js:1357

and in this part of the code is when i used “indexOf”

I have been searching for a solution for days and it is very difficult for me to understand what may have gone wrong. Any help I appreciate.


Could you please, provide a more detailed sample of your code, or a demo, where the problem could be reconstructed locally.


Hi, here i write the entire code:


This is your provided code in the snippet:
Could please, update it so the problem could be reconstricted.