jQuery UI Widgets › Forums › Grid › dataBind() no more working with the latest version
Tagged: gridview control
This topic contains 5 replies, has 3 voices, and was last updated by Peter Stoev 11 years, 3 months ago.
-
Author
-
Hi Team,
Please I was working with 2.7 and I decided to migrate to the latest version. But throughout the application everywhere I was refreshing datagrid with dataBind() method is no more working. Whenever I call this method (dataadapter.dataBind();), it empties the data grid rather instead of refreshing data, which is a strange behaviour. Please what replaces this method ?
Thanks,
Hi mesken,
The Grid’s data should be updated by calling its “updatebounddata” method.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.combut Before code is Simple:
dataAdapter.dataBind();
nowvar paginginformation = $(‘#jqxgrid’).jqxGrid(‘getpaginginformation’);
$(‘#jqxgrid’).jqxGrid(‘updatebounddata’);
if(paginginformation.pagenum==0){
$(‘#jqxgrid’).jqxGrid(‘updatebounddata’);
}else{
$(‘#jqxgrid’).jqxGrid(‘gotopage’, 0);
}and all code have to be change.
Hi Jay Yoon,
I am not sure why you use such code, but “updatebounddata” method updates the Grid’s data. dataAdapter.dataBind() updates the dataAdapter’s data, not the Grid’s data.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter Stoev
Sorry for I didn’t explain my source code.I use 2.8x version :
$.goSearch = function(){
source.data = {searchword:’test’};
dataAdapter.dataBind();
}
then send params :
filterscount:0
groupscount:0
pagenum:0
pagesize:20
recordstartindex:0
recordendindex:20but 3.0.x version don’t send that params at first time call function but I moved 2 page and called same function send that params.
I just think better before version:
Thanks,
Hi Jay Yoon,
The Grid sends the parameters in the initialization depending on the features that you enabled during the construction of the widget. The fact that you can put the Grid to an initial page(different than 0), implement server sorting, filtering on start up proves that it sends the appropriate parameters when the widget is constructed. There are multiple changes since ver. 2.8 in the widget and I suggest you to look at the Release Notes, before upgrading, because you will most probably have to make some small changes in your code.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.