The GXT Grid
component can be complex to new users, especially with its bells and whistles turned on. However, we can demonstrate a very basic and intuitive usage, one that can be grasped even by GXT beginners.
It turns out that working with Grids
basically boils down to working with a list of ColumnConfig
objects (the columns) with which to make a ColumnModel
which is in turn used alongside a ListStore
(contains the data) to construct Grid
.
Create a ColumnModel
object from a list of ColumnConfig
objects and then create a ListStore
to hold the data intended for the grid. The grid can now be constructed, configured, and then displayed on the screen.
@Override public void onApply() { // A list for the column configurations List<ColumnConfig> configs = new ArrayList<ColumnConfig>(); // This how you would make a normal column, // give it an id, label, and initial width // the id is a property in the bean you are trying...