Hello,
I am new at Servoy and I am starting with little steps. I am trying to develop an application using the Table Bean. I have noticed all the useful proprieties and methods,but I just don’t know where to start with this bean. How do I insert a column in it? Can you help me? Many many thanks in advance!
Diana
Hi Diana,
First of all welcome to the forum!
I assume that when you say Table Bean you mean the InMemDataGrid bean that comes bundled with Servoy.
This bean works with something what is called a TableModel. You can get this TableModel by creating a DataSet first using the databaseManager node (see Editor).
Once you have a (filled or empty) DataSet you can convert it to a TableModel using the DataSet method ‘getAsTableModel()’.
After this you pass the TableModel to the bean using the ‘setModel(yourTableModelVariable)’ method.
Adding columns to the TableModel can’t be done at this point. You need to do that in the DataSet and convert and pass it again to the bean.
Hope this helps.
Hy,
Thank you for the warm welcome
I am actually using the foundsetGrid ‘flavour’ of the Table Bean. I have downloaded the Table Bean, together with a trial licence, from www.servoy-plugins.de website. I have very little experience with Servoy… Can you help me?
Hi Diana,
Did you import the sample solution that came with it ? You should find it in the solutions directory in the Servoy directory.
As far as I can see it doesn’t allow you to add a column on the fly but you can set the columns when you create the table (in the bean). So it looks like you need to recreate the table when you add a new column to it.
Hope this gets you further.
Hi,
Thank you so much for your help! It really got me started, I appreciate it