jQWidgets Forums

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Scrolling is not working Scrolling is not working #14076

    farhadidrees
    Member

    Yes Peter i have already import scroll panel and buttons files..
    but its not working…..nothing showing on my screen..
    when i remove panel file so it shows list but without scroll…
    what should i do?

    in reply to: How to delete row from grid How to delete row from grid #11622

    farhadidrees
    Member

    Peter I need help…
    now i can update data using php in jquery but i m not able to delete row from data grid…
    thats php script

    $row[‘name’],
    ‘id’ => $row[‘id’]

    );
    }

    echo json_encode($certificate);
    }
    ?>

    and thats jquery code

    $(document).ready(function () {
    // prepare the data
    var data = {};
    var theme = ‘classic’;

    var source =
    {
    datatype: “json”,
    datafields: [
    { name: ‘name’},
    { name: ‘id’}
    ],
    id: ‘id’,
    url: ‘data_qualification.php’,
    updaterow: function (rowid, rowdata, commit) {
    // synchronize with the server – send update command
    var data = “update=true&name=” + rowdata.name;// + “&LastName=” + rowdata.LastName + “&Title=” + rowdata.Title;
    /// data = data + “&Address=” + rowdata.Address + “&City=” + rowdata.City + “&Country=” + rowdata.Country + “&Notes=””;
    data = data + “&id=” + rowdata.id;

    $.ajax({
    dataType: ‘json’,
    url: ‘data_qualification.php’,
    data: data,
    success: function (data, status, xhr) {
    // update command is executed.
    commit(true);
    },

    //for delete row
    deleterow: function (rowid, commit) {

    data = data + “&id=” + rowdata.id;
    // synchronize with the server – send delete command
    // call commit with parameter true if the synchronization with the server is successful
    //and with parameter false if the synchronization failed.

    commit(true);
    }
    });
    }
    };

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

    // initialize jqxGrid
    $(“#jqxgrid”).jqxGrid(
    {
    width: 280,
    height: 350,
    selectionmode: ‘singlecell’,
    source: dataAdapter,
    theme: theme,
    editable: true,
    columns: [
    { text: ‘ID’, editable: false, datafield: ‘id’, width: 100 },

    { text: ‘ Certificate Name’, datafield: ‘name’, width: 180 }

    ]
    });
    });

    // delete row.
    $(“#deleterowbutton”).bind(‘click’, function () {
    var selectedrowindex = $(“#jqxgrid”).jqxGrid(‘getselectedrowindex’);
    var rowscount = $(“#jqxgrid”).jqxGrid(‘getdatainformation’).rowscount;
    if (selectedrowindex >= 0 && selectedrowindex < rowscount) {
    var id = $("#jqxgrid").jqxGrid('getrowid', selectedrowindex);
    var commit = $("#jqxgrid").jqxGrid('deleterow', id);
    }
    });

    i know there is some mistake…
    waiting for answer..
    REgards…
    Farhad

    in reply to: How to delete row from grid How to delete row from grid #11612

    farhadidrees
    Member

    Thans Peter…
    You are owsum…u know me doing work on my final year project…
    Jquery is intresting 🙂

    thanks onceagain..


    farhadidrees
    Member

    Hi Peter..
    i have loaded all the files but its not working..
    could u please explain?
    Regards..
    Farhad

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