Hello,

I'm working with a *grid*, and I need to show d*ifferent number of columns
depending on a selection*.

 In my .tml file I have:

 <table t:type="grid" t:id="gridValues" source="values" row="value">
 </table>

I found that I can specify the properties via the .java file, so I add:

@Component (parameters = {"include=name, age"})
 private Grid gridValues;

So, at this moment I have a grid with 2 columns. The problem is that *in
some cases I'll need 2 columns and in other cases I'll need 3/4/5 columns*.

My question is:
Is there any way of add/remove columns to the grid when the page is
loading?.
Or defining the component of different ways?
Or redefining the component?.
Or declaring the component with all columns and then make some of then
not-visible?
Or accesing DataModel/DataSource/SourceModel or similar to add/remove
columns in runtime?

I am thinking in another way of doing this, and all I can find is defining
several grids (one for 2 columns, other for 3, other for 4,....), but I
prefer not to use this way.

-- 
Santiago Wenceslao Fernández Lorenzo
www.santiquetzal.es

Reply via email to