3.2.0

get column count

i want use obj.getColumnCount() to get grid column count.
but when i use obj.setColumnValues() hidden some columns.
obj.getColumnCount() can only get visible column count.
how to get the column count include the invisible columns.
sxf
November 17,
Hello,

I ran into the same problem and found this solution :
obj.getColumnLast()+1
will give you the total column count, including hidden columns, but with one condition : the last columns must not be hidden (if it is the case they are not counted, I have posted a message to ask why but got no reply...)

Franck
November 18,
Hello again,

There is a better way to get the visible column count :
getColumnIndices().length
this gives you an an array of all the visible columns indexes.
(and it always works, in all cases)

For example in a grid with columns 0 to 3 where column 2 is hidden, this function will give you the following array :
[0] 0
[1] 1
[2] 3
Franck
November 18,

This topic is archived.

See also:


Back to support forum