During the initialization it is necessary to specify the number of grid columns and which column indices should be used to retrieve cells/headers/footers content .
obj.setColumnCount(5);
By default the grid uses column indices from 0 to count-1 unless the array of column indices is explicitly set with setColumnIndices() call.
obj.setColumnIndices([2, 7, 8, 9, 4]);