Group in grid?

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

Group in grid?

#1

Postby t4nu » Wed May 25, 2016 11:17 am

Hi,
If I want to create a group in grid, what should I do?
What I mean with create group is that evertime certain code in certain field change then the value of that field will occupy the whole row (that row look like merged).

I notice that I can use repeater, but it seems if I want to change the size of certain field, I have to adjust other fields too.

I thought something combining repeater with table, but don't know how to put the value from repeater (as group) to datasource criteria used in table.

Thanks in advance for the help.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Wed May 25, 2016 2:03 pm

The conventional way to do this is to use Nested Tables. There is an example of this in the Ebase Xi Vault http://vault.ebasetech.com/ebase/vaultD ... dRepeaters you can download this straight into a V5 designer by using Help > Ebase Xi Vault.

You need two Ebase tables - one for your groups probably just containing the group name, and one for the rest of your data including the group name. Then you can display the outer table (groups) as a Repeater Control with the inner table (your data) inside it displayed either as a Table Control or a Repeater Control. For the inner Table/Repeater Control configure the Filter Expression property something like: groups-groupname = data-groupname (this is FPL syntax).

You can have problems of alignment using this technique, though these can usually be fixed by setting explicit widths for the columns. If all else fails you always have the option of using two Repeaters with custom layouts, then you can use any HTML you like.
0 x

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

#3

Postby t4nu » Thu May 26, 2016 11:32 am

Thank you very much, Jon.
as usual your answer solved my problem.
I use the repeater and table as the solution.
Jon wrote:The conventional way to do this is to use Nested Tables. There is an example of this in the Ebase Xi Vault http://vault.ebasetech.com/ebase/vaultD ... dRepeaters you can download this straight into a V5 designer by using Help > Ebase Xi Vault.

You need two Ebase tables - one for your groups probably just containing the group name, and one for the rest of your data including the group name. Then you can display the outer table (groups) as a Repeater Control with the inner table (your data) inside it displayed either as a Table Control or a Repeater Control. For the inner Table/Repeater Control configure the Filter Expression property something like: groups-groupname = data-groupname (this is FPL syntax).

You can have problems of alignment using this technique, though these can usually be fixed by setting explicit widths for the columns. If all else fails you always have the option of using two Repeaters with custom layouts, then you can use any HTML you like.
0 x


Who is online

Users browsing this forum: No registered users and 19 guests