Table merge cells - Vaadin -


i'm creating table vaadin. of cells repeating. want them merge in 1 cell, can see on image:enter image description here

the first image show how table looks now, , second how want merged cells.

i'm using code:

table table = new table(appdata.getmessage("menu.report2")); table.addcontainerproperty(tableheaders[0], string.class, null); table.addcontainerproperty(tableheaders[1], string.class, null); table.addcontainerproperty(tableheaders[2], string.class, null); table.addcontainerproperty(tableheaders[3], string.class, null);  list<user> employeelist = employeedao.findallemployees(); int i; (i = 0; < employeelist.size(); i++) {     user employee = employeelist.get(i);     table.additem(new object[]{             casestatus.open,             tasksdao.counttasks(casestatus.open),             employee.getfirstandlastname(),             tasksdao.counttasks(employee, casestatus.open)},             i); }  (int j = 0; j < employeelist.size(); j++) {     user employee = employeelist.get(j);     table.additem(new object[]{             casestatus.closed,             tasksdao.counttasks(casestatus.closed),             employee.getfirstandlastname(),             tasksdao.counttasks(employee, casestatus.closed)},             + j); }   table.setpagelength(table.size());  addcomponent(table); setcomponentalignment(table, alignment.top_center); setmargin(true); 

i think, not possible in "normal way". have idea how simulate this.

first solution:

you use gridlayout build grid want. nothing limit imagination beside size of such grid. shouldn't big (also pointed here).

second solution:

another advice bit crazy.

  1. disable table/grid stripes.
  2. in group of similar cells fill first row. left rest blank (or space in string).

then dispose of repeated data (from first , second column), can't alignment them vertically (the text stay @ top - first row group).

third solution:

check add-ons list. example itemgrid.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -