i have an EditorGrid filled with a BasePagingLoader like this :
Code:
loader = new BasePagingLoader<PagingLoadResult<KeywordModel>>(new RpcProxy<PagingLoadResult<KeywordModel>>() {
@Override
protected void load(Object aLoadConfig, final AsyncCallback<PagingLoadResult<Model>> callback)
{
config.loadConfig = (BasePagingLoadConfig) aLoadConfig;
ConfigurationServiceAsync service = ConfigurationService.Util.getInstance();
service.getData(config.loadConfig, new AsyncCallback<KeywordData>() {
@Override
public void onSuccess(Data result)
{
BasePagingLoadResult<Model> loadResult = new BasePagingLoadResult<Model> (keywordsList, config.loadConfig.getOffset(), result.getData());
callback.onSuccess(loadResult);
The problem is that when i try to edit a row i get the value of another row because the rowIndex is not the one of the store.
I've tried to override the onDoubleClick(..) method so that index of the grid used by e.getRowIndex() be equals to the store index of my EditorGrid
Code:
editGrid = new EditorGrid<DataModel>(store, columnModel)
{
@Override
protected void onDoubleClick(GridEvent<DataModel> e) {
int rowIndex = e.getRowIndex();
store.removeAll();
List<DataModel> reindexList = new ArrayList<DataModel>();
// fill the reindexList
store.add(reindexList);
}
if (editSupport.onDoubleClick(e)) {
return;
}
super.onDoubleClick(e);
};
};
but i got nothing..
Any helps would be welcomed.
Thanks