Table merge cells - Vaadin -
i'm creating table vaadin. of cells repeating. want them merge in 1 cell, can see on image:
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.
- disable
table
/grid
stripes. - 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:
Comments
Post a Comment