Hello. Basically, I want to create a table like this:
I created a grid, and added the text values, and the checkboxes. Exactly like in your email box, where you select some mails, and delete them or mark spam.
This is what I have done till now:
Grid grid = new Grid(4, 3);
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonValue = jsonArray.get(i).isObject();
String lid = jsonValue.get("id").isString().toString()
.replace("\"", " ").trim();
String email = jsonValue.get("email-id").isString().toString()
.replace("\"", " ").trim();
grid.setWidget(i, 0, new CheckBox());
grid.setHTML(i, 1, lid);
grid.setHTML(i, 2, email);
tabDataAll.add(grid);
}
My question is: Is this the correct way to it? If yes, how can I say, on a click of a button, delete the selected rows?
Also, it would be an added bonus/advantage if I am able sort the columns.
Thanks a lot.