Forum Replies Created
-
Author
-
Is it an event to catch what the user types in the filter box and convert it into html string ?
Hi Dimitar,
Yes the checkChange events of all items are called. I try to imagine a solution where the checkChange events for items of level 1 do nothing when the item of level 0 is clicked. But I can’t find.
Ow can I make the difference between a checkChange of level 1 called when an item of level 1 is clicked and a checkChange of level 1 called when the item of level 0 is called ?
Do you have an idea for my problem ?
Best regards
Hi, the gotopage function must be called on the bindingcomplete event, not on the ready event.
And the value argument must be parsed in integerHi Peter,
Thanks for your answer, but it is not what I want to do. I still have a website with SQL request with LIMIT.
I just want to download all the datas in the jqxGrid and then apply filters, sorts and changing pages. If in the URL there is ?page=2, the second page must be automaticaly displayed and the user can go to page 1 or 3 without having to reload datas from server.
My code works fine with filters and sorts in the URL, but this do not work with gotopage (or gotonextpage)
$("#jqxgrid").jqxGrid( { width: ... ready: function () { $("#jqxgrid").jqxGrid('gotopage', 3); });
if i put the gotopage on a click event after the display of datas, it’s OK. But on the ready event of the grid, it doesn’t work.
error
- This reply was modified 10 years, 7 months ago by antonomase.
Edit : just an error from me.
January 14, 2013 at 9:35 am in reply to: Filter and characters with accents Filter and characters with accents #13570Hi Peter,
Thanks for your answer.
For having letters encoded send by ajax/json, I must encode them on the server otherwise the string with accentuated letters remains blank.
(code PHP)...while ($rs->fetchInto($row)) { $result[$i]["ID"] = $row["ID"]; $result[$i]["NOM"] = htmlentities($row["NOM"]); $result[$i]["VILLE"] = htmlentities($row["VILLE"]); $i++;}echo json_encode($result)
;
The string received by javascript contains html encoding like “Bergère”. So the comparison with “Bergère” typed on the keyboard does not work.
The solution is to decode html encoded string with this tool http://www.strictly-software.com/htmlencode (or another one)
var eta_GridModel = function () { this.items = ko.observableArray(); var me = this; $.ajax({ datatype: 'json', url: "return_list.php" }).done(function (data) { data = Encoder.htmlDecode(data); var jsonData = $.parseJSON(data); me.items(jsonData); });}
And now, the filter works.
The problem will be the same with string containing © or another &xxxx; character.Best regards
- This reply was modified 10 years, 8 months ago by antonomase.
- This reply was modified 10 years, 8 months ago by antonomase.
January 11, 2013 at 10:25 pm in reply to: Filter and characters with accents Filter and characters with accents #13532Hi,
Thanks for your answer. But i do not see a special condition for filtering words containing characters like é, ç, à, ü, …
How is it possible to have the “standard” filter working with words containing these characters ?
Hi,
I had a lot of problems with filtering :
– a column containing numerical values (55, 56, 57, 58) : impossible to filter with textbox nor list. The resultat was not good
– applying a filter on one column put this column gray (normal) and another one also gray (not normal)I have resolved all the problems when I indicate the type of values :
filter does not work :
datafields: [{name: ‘NOM’}, {name: ‘VILLE’}, {name: ‘DEPA’}, {name: ‘IDE’]]filter works :
datafields: [{name: ‘NOM’, type: ‘string’}, {name: ‘VILLE’, type: ‘string’}, {name: ‘DEPA’, type: ‘string’}, {name: ‘IDE’, type: ‘bool’}]January 11, 2013 at 3:46 pm in reply to: Globalization and loading gif Globalization and loading gif #13521Thanks.
I have changed the empdydatastring. It’s not the best way, but it works (the loading of data is quick enough)
January 10, 2013 at 12:19 pm in reply to: Globalization and loading gif Globalization and loading gif #13441Hi 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 Peter,
Thank you for your answer
-
AuthorPosts