jQWidgets Forums

Forum Replies Created

Viewing 8 posts - 31 through 38 (of 38 total)
  • Author
    Posts
  • in reply to: Field fiter "Grid" Field fiter "Grid" #11391

    ekaperintis
    Participant

    Hi Peter Stoev

    I’m sorry, did not mean to offend you

    I’m sorry if the language used is not understood, I’m from Indonesia and not too advanced english

    thank you

    in reply to: Field fiter "Grid" Field fiter "Grid" #11372

    ekaperintis
    Participant

    AH HA!!!! Thanks Peter, really appreciate your assistance/patience 🙂 downloaded 1.7.2 and looking better already!

    Can you to code programs that are run well ….

    Thanks …

    in reply to: Search in toolbars Search in toolbars #11363

    ekaperintis
    Participant

    sorry I do not understand,

    may I ask for an example source code

    in reply to: Search in toolbars Search in toolbars #11333

    ekaperintis
    Participant

    The above two source code,,, please corrected ,,,

    in reply to: Search in toolbars Search in toolbars #11332

    ekaperintis
    Participant
    <?php
    #Include the connect.php file
    include('connect.php');
    #Connect to the database
    //connection String
    $connect = mysql_connect($hostname, $username, $password)
    or die('Could not connect: ' . mysql_error());
    //Select The database
    $bool = mysql_select_db($database, $connect);
    if ($bool === False){
    print "can't find $database";
    }
    // get data and store in a json array
    $query = "SELECT * FROM tr_drd WHERE Nopel LIKE '%".mysql_real_escape_string($_GET['Nopel'])."'";
    if (isset($_GET['update']))
    {
    // UPDATE COMMAND
    $awal= mysql_real_escape_string($_GET['awal']);
    $akhir =mysql_real_escape_string($_GET['akhir']);
    $kubik = $akhir - $awal;
    $update_query = "UPDATE `tr_drd` SET `akhir`='".mysql_real_escape_string($_GET['akhir'])."',
    `kubik`='$kubik' WHERE `Nopel`='".mysql_real_escape_string($_GET['Nopel'])."'";
    //$update_query = "UPDATE `tr_drd` SET `awal`='".mysql_real_escape_string($_GET['awal'])."',
    //`akhir`='".mysql_real_escape_string($_GET['akhir'])."',
    //`kubik`='".mysql_real_escape_string($_GET['kubik'])."' WHERE `Nopel`='".mysql_real_escape_string($_GET['Nopel'])."'";
    $result = mysql_query($update_query) or die("SQL Error 1: " . mysql_error());
    echo $result;
    }
    else
    {
    // SELECT COMMAND
    $result = mysql_query($query) or die("SQL Error 1: " . mysql_error());
    while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    $employees[] = array(
    'Nopel' => $row['Nopel'],
    'Tr_Date' => $row['Tr_Date'],
    'awal' => $row['awal'],
    'akhir' => $row['akhir'],
    'kubik' => $row['kubik']
    );
    }
    echo json_encode($employees);
    }
    ?>
    in reply to: Search in toolbars Search in toolbars #11331

    ekaperintis
    Participant
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <script type="text/javascript" src="../../scripts/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.filter.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcheckbox.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxwindow.js"></script>
    <script type="text/javascript" src="../../scripts/gettheme.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.edit.js"></script>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.classic.css" type="text/css" />
    <script type="text/javascript">
    $(document).ready(function () {
    // prepare the data
    var data = {};
    var theme = getTheme();
    var source =
    {
    datatype: "json",
    datafields: [
    { name: 'Nopel'},
    { name: 'Tr_Date'},
    { name: 'awal'},
    { name: 'akhir'},
    { name: 'kubik'}
    ],
    id: 'Nopel',
    url: 'data.php',
    updaterow: function (rowid, rowdata, commit) {
    // synchronize with the server - send update command
    var data = "update=true&Tr_Date=" + rowdata.Tr_Date + "&awal=" + rowdata.awal + "&akhir=" + rowdata.akhir;
    data = data + "&kubik=" + rowdata.kubik;
    data = data + "&Nopel=" + rowdata.Nopel;
    $.ajax({
    dataType: 'json',
    url: 'data.php',
    data: data,
    success: function (data, status, xhr) {
    // update command is executed.
    commit(true);
    }
    });
    }
    };
    var dataAdapter = new $.jqx.dataAdapter(source,
    {
    formatData: function (data) {
    data.name_startsWith = $("#Nopel").val();
    return data;
    }
    }
    );
    //var dataAdapter = new $.jqx.dataAdapter(source);
    //http://www.jqwidgets.com/community/topic/filtering-grid-at-runtime-through-textbox/#post-8040
    // initialize jqxGrid
    $("#jqxgrid").jqxGrid(
    {
    width: 1000,
    height: 350,
    selectionmode: 'singlecell',
    source: dataAdapter,
    showtoolbar: true,
    //autoheight: true,
    theme: theme,
    editable: true,
    altrows: true,
    columns: [
    { text: 'Nopel', editable: false, datafield: 'Nopel', width: 100 },
    { text: 'Tanggal', editable: false, datafield: 'Tr_Date', width: 200 },
    { text: 'Awal', editable: false, datafield: 'awal', width: 200 },
    { text: 'Akhir', datafield: 'akhir', width: 180 },
    { text: 'Kubik', editable: false, datafield: 'kubik', width: 180 }
    ],
    rendertoolbar: function (toolbar) {
    var me = this;
    var container = $("<div style='margin: 5px;'></div>");
    var span = $("<span style='float: left; margin-top: 5px; margin-right: 4px;'>No. Pelanggan: </span>");
    var input = $("<input class='jqx-input jqx-widget-content jqx-rc-all' id='Nopel' type='text' style='height: 23px; float: left; width: 223px;' />");
    toolbar.append(container);
    container.append(span);
    container.append(input);
    if (theme != "") {
    input.addClass('jqx-widget-content-' + theme);
    input.addClass('jqx-rc-all-' + theme);
    }
    input.bind('keydown', function (event) {
    if (input.val().length >= 2) {
    if (me.timer) clearTimeout(me.timer);
    me.timer = setTimeout(function () {
    dataAdapter.dataBind();
    }, 300);
    }
    });
    }
    });
    });
    </script>
    </head>
    <body class='default'>
    <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;">
    <div id="jqxgrid"></div>
    </div>
    </body>
    </html>
    in reply to: Calculated Cell Calculated Cell #11316

    ekaperintis
    Participant

    Oke, thanks,

    Good Jobs. I Like the Grid

    in reply to: Calculated Cell Calculated Cell #11311

    ekaperintis
    Participant

    okay thanks,
    is there another way or another trick to solve the problem ???

Viewing 8 posts - 31 through 38 (of 38 total)