Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

ListGrid getRecordList always return null

$
0
0
Hi,
I just updated my SmartGWT plugin to the latest version, but my code has stopped working.
I use a ListGrid without datasource, I set the data manually, so something like that:
Code:

centerGrid = new ListGrid();
centerGrid.setSelectionType(SelectionStyle.SIMPLE); 
centerGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);

records = new ListGridRecord[data.size()];
for(int i=0; i<data.size();++i){
  /* Add record to records */
}

centerGrid.setData(records);

Then I have a list of default elements to be selected, so I do:
Code:

for(int i=0; i<defaultElements.size(); ++i){
  centerGrid.selectRecord(centerGrid.getRecordList().find("fieldName", defaultElements.get(i)));
}

The problem is that centerGrid.getRecordList() always return "null", but I just set the records...

In the older version of smartGWT that I was using (3.0p) this problem didn't appears.
I attached an image of the right output that should be produced.

The browser that I use for tests is Firefox 24.3.0
GWT 2.5.0
SmartClient Version: v10.0p_2014-11-25/LGPL Development Only (built 2014-11-25)


Thanks

Attached Images
File Type: jpg Senza titolo-1.jpg (30.5 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles