i use ListGrid component with a datasource clientOnly + TestData (cause i use GWT rpc to retreive data from the server). The most part of that works perfectly minus one things : When i add a new row to the datasource using addRecord, and then try to retreive it using ListGrid.getRecord or select it using ListGrid.selectRecord(int), that doesn’t work.
call to getRecord on the listGrid return null (but the UI shows my added row). There is no datasource.getRecord() to use (i openned an issue for that).
A call to selectedRecord on a new record added to the datasource just doesn’t do nothing. Select an existing record works (some record are present on the datasource before the call to setTestData).
as a matter of fact, i use the method addData without any callback. I thought i made sense since there is no access to any server cause it’s a client only datasource. Do i need to use the callback? If it’s the case, what is the use of addData with no callback?
addData with no callback will add data as soon as possible, but it does not ensures that after you called the method the data was added.
addData with callback ensures that when the callback is called you have the data added.
I guess that addData without callback is for when you want the data added but don’t want to know exactly when that’s being done, all you know is that will be added sooner or later…