jQWidgets Forums

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts

  • eck8tor
    Participant

    Hello Hristo,

    Thanks for your answer. It was not working but I modified like this and it’s working !

    updaterow: function (rowid, rowdata, commit) 
    {
       // synchronize with the server - send update command
       var data = "update=true&contacts=" + rowdata.contacts + "&comments=" + rowdata.comments + "&host=" + rowdata.host;
       $.ajax(
       {
          dataType: 'json',
          url: 'data-editable.php',
          data: data,
          success: function (data, status, xhr) 
          {
    	 // update command is executed.
             commit(true);
    	 <strong>window.location.reload();</strong>
    	 <strong>$("#jqxgrid").jqxGrid('refreshdata');</strong>
          },
          error: function () 
          {
             // cancel changes.
             commit(false);
    	 <strong>window.location.reload();</strong>
    	 <strong>$("#jqxgrid").jqxGrid('refreshdata');</strong>
          }
       });
    }

    Thanks Again for your help !

    Kind Regards,

    Eric


    eck8tor
    Participant

    Hello Hristo,

    Thanks for your answer.

    I removed the line:
    $(“#jqxgrid”).jqxGrid(‘updatebounddata’, ‘cells’);

    I try to add this:

    $('#jqxgrid').on('cellendedit', function (event) {
    	$("#jqxgrid").jqxGrid('updatebounddata');
     });
    

    At the end of the script and it’s not working.

    Could you provide the full syntax of what I need to add please.

    Kind Regards,

    Eric


    eck8tor
    Participant

    Thanks Dimitar for your quick answer…

    I just revisite my code and now everything it’s correct ! NO MORE ERRORS !!!!

    Thanks 🙂


    eck8tor
    Participant

    Case close !

    I found my problem, by passing an argument, for the debug purpose, I echo my argument and it was returning. So the string was not the same.


    eck8tor
    Participant

    I’m almost there…. but I need an explanation.

    This is my code of my index.php

    $(document).ready(function ()
    {
    // prepare the data
    var source =
    {
    datatype: “json”,
    datafields:
    [
    //{ name: ‘Divsion’, type: ‘string’},
    { name: ‘genre’, type: ‘string’}
    ],
    url: ‘genre.php’
    };

    var dataAdapter = new $.jqx.dataAdapter(source);

    $(“#genrelistbox”).jqxListBox(
    {
    source: dataAdapter,
    theme: ‘classic’,
    width: 350,
    height: 250,
    displayMember: ‘Divsion’,
    valueMember: ‘genre’
    });

    var groupe =
    {
    datatype: “json”,
    //type: “POST”,
    datafields:
    [
    { name: ‘artiste’, type: ‘string’}
    ],
    url: ‘groupe.php’
    };

    console.log(groupe);
    var groupeAdapter = new $.jqx.dataAdapter(groupe);

    $(“#groupelistbox”).jqxListBox(
    {
    source: groupeAdapter,
    theme: ‘classic’,
    width: 350,
    height: 250,
    valueMember: ‘artiste’
    });

    $(‘#genrelistbox’).bind(‘change’, function (event) {
    newid=$(this).val();

    var newdata = “id=” + newid;
    var changegroupe =
    {
    datatype: “json”,
    type: “GET”,
    datafields:
    [
    { name: ‘artiste’, type: ‘string’}
    ],
    url:’groupe.php?id=’+newid

    or
    url:’groupe.php’,
    data: newid
    };

    console.log(changegroupe);
    console.log(newdata);
    var changegroupeAdapter = new $.jqx.dataAdapter(changegroupe);

    $(“#groupelistbox”).jqxListBox(
    {
    source: changegroupeAdapter,
    theme: ‘classic’,
    width: 350,
    height: 250,
    valueMember: ‘artiste’
    });
    console.log(“var groupe : ” + newid);
    });

    });

    Where I call $(‘#genrelistbox’).bind(‘change’, function (event) {, I try to pass to the url a variable (ie:groupe.php?id=Alternative)

    But the groupe.php didn’t receive the variable.

    Where is my error ?

Viewing 5 posts - 1 through 5 (of 5 total)