SmartGWT pro 2017-12-17 6.0
I am trying to get a list of the currently visible fields in a listgrid, since the user might have hidden some. The only way i've found is to iterate through the grid's fields and call getHidden()- on them.
Unfortunately that method throws a nullpointer.
Not sure why this can happen? The field is clearly not null since i print out its name on the row before. Thoughts appreciated.
I am trying to get a list of the currently visible fields in a listgrid, since the user might have hidden some. The only way i've found is to iterate through the grid's fields and call getHidden()- on them.
Unfortunately that method throws a nullpointer.
Code:
ListGridField[] fields = grid.getFields(); for (ListGridField field : fields) { if(field != null){ System.out.println("Checking field "+field.getName()); if (field.getHidden()) {//throws Nullpointer!
Comment