Forum Replies Created

Viewing 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • in reply to: Filtering with accent Filtering with accent #46836

    antonomase
    Participant

    Is it an event to catch what the user types in the filter box and convert it into html string ?

    in reply to: Auto check / unchecked Auto check / unchecked #23089

    antonomase
    Participant

    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

    in reply to: How to go to a page How to go to a page #15560

    antonomase
    Participant

    Hi, the gotopage function must be called on the bindingcomplete event, not on the ready event.
    And the value argument must be parsed in integer

    in reply to: How to go to a page How to go to a page #15544

    antonomase
    Participant

    Hi 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.

    in reply to: How to go to a page How to go to a page #15540

    antonomase
    Participant

    error

    • This reply was modified 10 years, 7 months ago by  antonomase.
    in reply to: how to get sort order how to get sort order #15537

    antonomase
    Participant

    Edit : just an error from me.


    antonomase
    Participant

    Hi 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.

    antonomase
    Participant

    Hi,

    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 ?

    in reply to: Issues with jqGrid Issues with jqGrid #13522

    antonomase
    Participant

    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’}]

    in reply to: Globalization and loading gif Globalization and loading gif #13521

    antonomase
    Participant

    Thanks.

    I have changed the empdydatastring. It’s not the best way, but it works (the loading of data is quick enough)

    in reply to: Globalization and loading gif Globalization and loading gif #13441

    antonomase
    Participant

    Hi 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.

    in reply to: Ajax wheel Ajax wheel #11947

    antonomase
    Participant

    Hi Peter,

    Thank you for your answer

Viewing 12 posts - 16 through 27 (of 27 total)