Acess columns array properties
Acess columns array properties
persona
Posts: 13Questions: 3Answers: 1
Hi,
I need to access the column properties that I define in grid initialization.
I'm trying to access with grid.settings().columns(0), but the returned object is an array with an index:
[Array[1] 0: 0 length: 1]
Why this function returns an index and not the column object with the properties?
I see that aoColumns object contains an object array with all properties, but I can't access it by code.
Thanks.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The code you have functionality identical to writing
grid.columns(0)
- the settings object is not being used at all. And that's a good thing - you should avoid it!Use
init()
to get the initialisation options.grid.init().columns[0].type
for example.Allan
Perfect solution.
Thanks!!