how to use group element and how create table with checkbox

1
0
-1

Can you tell me about group element, how should we use this element,... and how create table and checkboxes together to select a row.... thanks....

1 answer

1
+1
-1

Best place to find out about a group widget is create-widget-group

and how to use it, saving-data-widget-group

as for creating a table with checkboxes use an HTML Widget with code that creates HTML for the table:

for example (not real code but gives you the idea)

StringBuilder tbl = new StringBuilder();
tbl.append("<table>");

int iRow = 0;
for(rows){
tbl.append("<tr>");
tbl.append("<td>"); //column 0 the checkbox
tbl.append("<input type=\"checkbox\" id=\"r+iRow.toString\"/>");
tbl.append("</td>");
iRow++;

for(dataColumns){ //other columns for data
tbl.append("<td>");
tbl.append(dataColumn);
tbl.append("</td>");
}

tbl.append("</tr>");
}
tbl.append("</table>");

return tbl.toString();

Hope this helps, regards Seán

Notifications