i have an application where onKeyUp i am changing the number of rows in the datasource (i' ve used ArrayList) by using ajax request.
My data Source originally have 16 rows and after change it has 3 rows . after that i ' ve used getGridObj.dataBind(); and smart refreshed gridview . Then my gridView is showing the first three rows of original datasource instead of new values.
Hi, SAN3010!
Could you, please, post a snippet of your source code. Are you sure you update your datasource with the correct data?
Thanks!
hi,
sorry for the delay,
here is my code snippet..
getGrid().getChildren().clear();
ArrayList al = filterOut(val);
setListForGrid(al);
getGrid().dataBind();
}
ArrayList alList = new ArrayList();
String toBeTested = temp.getEmployeeName().toUpperCase();
String testString = val.toUpperCase();
alList.add(getSearchList().get(i));
filterMyGrid(String val) is called by servlet which is called by ajax request...
after getting response i've refreshed only grid in javascript.
Hi,
Everything you need to do to update your WegGrid it to bind it with an HtmlGridView object and to have defined a dataSource. When you perform changes in your dataSource the only thing is to call getGrid().dataBind() to make the grid reconnect to its dataSource. If the dataSource was updated correctly with the new data, the grid will show it automatically.
Regards!