How to create a dynamic grid?

Is it possible to show only columns which are not null ?

Technically speaking yes, but you have to implement it yourself by iterating over all objects and values and build the grid once you know it