jQuery UI Widgets › Forums › Grid › Globalization and loading gif
Tagged: grid control
This topic contains 4 replies, has 2 voices, and was last updated by antonomase 10 years, 11 months ago.
-
Author
-
Hi,
Two questions :
1) How to change the texts of the pager ‘Go to page’, ‘Show rows’, … under a grid ?
2) I use JSON and Knockout to load datas into a grid (similar as the sample). But the animated gif (loader) is not displayed during the loading time ?Why ?
On the server I have \jqwidgets-2.6 with all the js files and the subdirectories globalization, resources and styles
Best regards
- This topic was modified 10 years, 11 months ago by Peter Stoev. Reason: Moved to Grid Forum
Hi antonomase,
1. For localization, see: jquery-grid-localization.htm.
2. The Loading Gif is displayed when the Grid is bound to a dataAdapter and the dataAdapter calls the Ajax function. Otherwise, it will not be displayed.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
Thanks for the firsts answer
For the second one, my code is
[code]
$(document).ready(function () {
var url = "lst.ajax.php";
var GridModel = function () {
this.items = ko.observableArray();
var me = this;
$.ajax({
datatype: ‘json’,
url: "lst.ajax.php"
}).done(function (data) {
var jsonData = $.parseJSON(data);
me.items(jsonData);
});
}
var model = new GridModel();var eta_source =
{ datatype: "observablearray",
datafields: [{name: ‘NAME’}, {name: ‘ADDRESS’}],
id: ‘ID’,
localdata: model.items,
pager: function (pagenum, pagesize, oldpagenum) {}
};var eta_dataAdapter = new $.jqx.dataAdapter(eta_source);
$("#eta_jqxgrid").jqxGrid(
{ width: ‘100%’, height: 560,
source: eta_dataAdapter,
sortable: true,
pageable: true,
pagesize: 20,
autoheight: false,
theme: theme,
columns: [
{text: ‘<b>Name</b>’, datafield: ‘NAME’},
{text: ‘<b>Address</b>’, datafield: ‘ADDRESS’, width:200}
]
});
[/code]It is the same code as yours.
Hi antonomase,
In the code, the Ajax call is not made through the dataAdapter and the built-in loading image will not be displayed in that scenario.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks.
I have changed the empdydatastring. It’s not the best way, but it works (the loading of data is quick enough)
-
AuthorPosts
You must be logged in to reply to this topic.