Listgrid of smartgwt has a feature to show row number. I tried to use that for small tables and it works like a charm.
But for tables where the number of rows is more than 9999, "row number" column does not show more that 4 digits.
So, here is a question. How to make Listgrid to show all digits in "row number" column?
My test grid:
ListGrid listGrid=new ListGrid();
listGrid.setWidth(300);
listGrid.setHeight(200);
ListGridField name = new ListGridField("name", "Name");
listGrid.setFields(name);
listGrid.setShowRowNumbers(true);
Record[] records=new Record[10000];
for (int i=0; i<records.length; i++){
Map<String, String> map=new HashMap<String, String>();
map.put("name", "Hello");
records[i]=new Record(map);
}
listGrid.setData(records);
listGrid.setAutoFitData(Autofit.HORIZONTAL);