当前位置: 首页>>代码示例>>PHP>>正文


PHP jqGridRender::setNavOptions方法代码示例

本文整理汇总了PHP中jqGridRender::setNavOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP jqGridRender::setNavOptions方法的具体用法?PHP jqGridRender::setNavOptions怎么用?PHP jqGridRender::setNavOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jqGridRender的用法示例。


在下文中一共展示了jqGridRender::setNavOptions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_main_grid

function get_main_grid()
{
    global $myconn, $customers;
    $myconn->query("SET NAMES utf8");
    //execute the query specifical to your database
    $sth = $myconn->prepare('SELECT CustomerID, CompanyName, ContactName, Phone, City FROM customers');
    $sth->execute();
    // get the data as array. Nothe the the customer array
    // is passed in the select command
    $customers = $sth->fetchAll(PDO::FETCH_ASSOC);
    // end of custom code
    //var_dump($customers);
    // create the array connection
    $conn = new jqGridArray();
    // Create the jqGrid instance
    $grid = new jqGridRender($conn);
    // Write the SQL Query
    $grid->SelectCommand = 'SELECT * FROM customers';
    // Set the table to where you update the data
    $grid->table = 'customers';
    // Set output format to json
    $grid->dataType = 'json';
    $grid->setPrimaryKeyId("CustomerID");
    // Let the grid create the model
    $grid->setColModel();
    // Set the url from where we obtain the data
    $grid->setUrl('grid.php');
    // Set some grid options
    $grid->setGridOptions(array("rowNum" => 10, "height" => 250, "rowList" => array(10, 20, 30), "sortname" => "CustomerID"));
    $grid->setColProperty('CustomerID', array("label" => "ID", "width" => 50));
    $grid->setSubGridGrid("subgrid.php");
    // Enable navigator
    $grid->navigator = true;
    // Enable only editing
    $grid->setNavOptions('navigator', array("excel" => false, "add" => false, "edit" => false, "del" => false, "view" => false));
    // Enjoy
    $grid->renderGrid('#grid', '#pager', true, null, null, true, true);
}
开发者ID:nong053,项目名称:prototype-nnit,代码行数:38,代码来源:grid.php

示例2: jqGridRender

// Tell the db that we use utf-8
$conn->query("SET NAMES utf8");
// Create the jqGrid instance
$grid = new jqGridRender($conn);
// Write the SQL Query
$grid->SelectCommand = 'SELECT OrderID, OrderDate, CustomerID, ShipName, Freight FROM orders';
// Set output format to json
$grid->dataType = 'json';
// Let the grid create the model
$grid->setColModel();
// Set the url from where we obtain the data
$grid->setUrl('grid.php');
// Set some grid options
$grid->setGridOptions(array("rowNum" => 10, "rowList" => array(10, 20, 30), "sortname" => "OrderID"));
// Change some property of the field(s)
$grid->setColProperty("OrderDate", array("formatter" => "date", "formatoptions" => array("srcformat" => "Y-m-d H:i:s", "newformat" => "m/d/Y")));
$grid->setColProperty("ShipName", array("width" => "200"));
// Enable navigator
$grid->navigator = true;
// Enable search
// By default we have multiple search enabled
$grid->setNavOptions('navigator', array("excel" => false, "add" => false, "edit" => false, "del" => false, "view" => false));
// In order to enable the more complex search we should set multipleGroup option
// Also we need show query roo
$grid->setNavOptions('search', array("multipleGroup" => true, "showQuery" => true));
// client side validation when search
$grid->setColProperty('OrderID', array("searchrules" => array("required" => true, "number" => true, "minValue" => 10200)));
$grid->setDatepicker('OrderDate');
// Enjoy
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$conn = null;
开发者ID:nong053,项目名称:prototype-nnit,代码行数:31,代码来源:grid.php

示例3: PDO

$conn = new PDO(DB_DSN, DB_USER, DB_PASSWORD);
// Tell the db that we use utf-8
$conn->query("SET NAMES utf8");
// Create the jqGrid instance
$grid = new jqGridRender($conn);
// Write the SQL Query
$grid->SelectCommand = 'SELECT a.OrderID, a.OrderDate, a.CustomerID, b.CompanyName, a.Freight, a.ShipName FROM orders a, customers b WHERE a.CustomerID=b.CustomerId';
// set the ouput format to json
$grid->dataType = 'json';
$grid->table = "orders";
$grid->setPrimaryKeyId("OrderID");
// Let the grid create the model
$grid->setColModel();
// Set the url from where we obtain the data
$grid->setUrl('grid.php');
// Set grid caption using the option caption
$grid->setGridOptions(array("caption" => "Advanced Autocomplete", "rowNum" => 10, "sortname" => "OrderID", "hoverrows" => true, "rowList" => array(10, 20, 50)));
// Change some property of the field(s)
$grid->setColProperty("OrderID", array("label" => "ID", "width" => 60));
$grid->setColProperty("CustomerID", array("editoptions" => array("readonly" => "readonly")));
$grid->setColProperty("OrderDate", array("formatter" => "date", "formatoptions" => array("srcformat" => "Y-m-d H:i:s", "newformat" => "m/d/Y")));
// set autocomplete. Serch for name and ID, but select a ID
// set it only for editing and not on serch
$grid->setAutocomplete("CompanyName", "#CustomerID", "SELECT CompanyName, CompanyName,CustomerID FROM customers WHERE CompanyName LIKE ? ORDER BY CompanyName", null, true, false);
$grid->datearray = array('OrderDate');
// Enjoy
$grid->navigator = true;
$grid->setNavOptions('navigator', array("search" => false, "excel" => false));
$grid->setNavOptions('edit', array("height" => 'auto', "dataheight" => 'auto'));
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$conn = null;
开发者ID:nong053,项目名称:prototype-nnit,代码行数:31,代码来源:grid.php

示例4: jqGridRender

// Create the jqGrid instance
$grid = new jqGridRender($conn);
// Write the SQL Query
$grid->SelectCommand = "SELECT name as Mnemonic, seen as Seen, lastseen as LastSeen FROM mne where hidden='false'";
// set the ouput format to json
$grid->dataType = 'json';
// Let the grid create the model
$grid->setColModel();
// Set the url from where we obtain the data
$grid->setUrl('includes/grid/mne.php');
// Set some grid options
$grid->setGridOptions(array("rowNum" => 19, "sortname" => "LastSeen", "sortorder" => "desc", "altRows" => true, "multiselect" => true, "scrollOffset" => 25, "shrinkToFit" => true, "setGridHeight" => "100%", "rowList" => array(20, 40, 60, 75, 100, 500, 750, 1000), "loadComplete" => "js:"));
$grid->setColProperty('Seen', array('width' => '20', 'formatter' => 'js:grid_formatSeen'));
$grid->setColProperty('LastSeen', array('width' => '35', 'formatter' => 'js:easyDate'));
$grid->navigator = true;
$grid->setNavOptions('navigator', array("pdf" => true, "excel" => true, "add" => false, "edit" => false, "del" => false, "view" => false, "search" => true));
$gridComplete = <<<ONCOMPLETE
\tfunction ()
\t{\t
\t setRememberedCheckboxesForDialog('mnemonics','gbox_mnegrid',12,'portlet_Mnemonics');

\t}
ONCOMPLETE;
$grid->setGridEvent('loadComplete', $gridComplete);
$custom = <<<CUSTOM

//---------------------------------------------------------------
// BEGIN: Mnemonic Select Dialog
//---------------------------------------------------------------
\$("#portlet-header_Mnemonics .ui-icon-search").click(function() {
    \$("#mne_dialog").dialog({
开发者ID:Russell-IO,项目名称:php-syslog-ng,代码行数:31,代码来源:mne.php

示例5: array

$grid->dataType = 'json';
$grid->setColModel();
$grid->setUrl('../grids/clr_application.php');
$grid->addCol(array("name" => "Actions", "formatter" => "actions", "editable" => false, "sortable" => false, "resizable" => false, "fixed" => true, "width" => 60, "formatoptions" => array("keys" => true)), "first");
$grid->setColProperty("id", array("editable" => false, "width" => 40, "fixed" => true, "label" => "ID"));
$grid->setColProperty("url", array("editable" => false, "frozen" => true, "width" => 500, "editoptions" => array("size" => 75, "maxlength" => 200), "formatter" => "link", "formatoptions" => array("target" => "_blank"), "fixed" => true, "editrules" => array("url" => true, "required" => false), "label" => "Url"));
$grid->setColProperty("email", array("editable" => false, "frozen" => true, "width" => 140, "editoptions" => array("size" => 75, "maxlength" => 200), "fixed" => true, "label" => "Email"));
$grid->setColProperty("applicationdate", array("formatter" => "date", "width" => 70, "fixed" => true, "formatoptions" => array("srcformat" => "Y-m-d", "newformat" => "Y-m-d"), "editable" => false, "label" => "Appl Date", "editoptions" => array("dataInit" => "js:function(elm){setTimeout(function(){\r\r\n     jQuery(elm).datepicker({dateFormat:'yy-mm-dd'});\r\r\n     jQuery('.ui-datepicker').css({'font-size':'75%'});\r\r\n         },200);}"), "searchoptions" => array("dataInit" => "js:function(elm){setTimeout(function(){\r\r\n     jQuery(elm).datepicker({dateFormat:'yy-mm-dd'});\r\r\n     jQuery('.ui-datepicker').css({'font-size':'75%'});\r\r\n         },200);}")));
$grid->setColProperty("autoapply", array("editable" => true, "label" => "Auto Apply", "width" => 50, "fixed" => true, "edittype" => "select"));
$grid->setSelect("autoapply", array("M" => "M"), false, true, true, array("" => "All"));
$grid->setColProperty("candidate", array("editable" => true, "label" => "Candidate", "width" => 50, "fixed" => true, "edittype" => "select"));
$grid->setSelect("candidate", array("Y" => "Y", "N" => "N"), false, true, true, array("" => "All"));
$grid->setGridOptions(array("sortable" => true, "width" => 1024, "height" => 400, "caption" => "Crawler Applications", "rownumbers" => true, "rowNum" => 1000, "sortname" => "applicationdate desc, id", "sortorder" => "desc", "toppager" => true, "rowList" => array(1000, 5000, 10000, 25000, 50000)));
$grid->showError = true;
$grid->navigator = true;
$grid->setNavOptions('navigator', array("pdf" => true, "excel" => true, "add" => true, "edit" => true, "del" => false, "view" => true, "search" => true));
$grid->setNavOptions('view', array("width" => 750, "dataheight" => 300, "viewCaption" => "Crawler Applications Management"));
$grid->setNavOptions('add', array("width" => 750, "dataheight" => 300, "closeOnEscape" => true, "closeAfterAdd" => true, "addCaption" => "Add Crawler Applications", "reloadAfterSubmit" => false));
$grid->setNavOptions('edit', array("width" => 750, "dataheight" => 300, "closeOnEscape" => true, "closeAfterEdit" => true, "editCaption" => "Update Crawler Applications", "reloadAfterSubmit" => false));
$grid->callGridMethod('#grid', 'setFrozenColumns');
$grid->callGridMethod('#grid', 'gridResize');
global $htmlcode;
$bindkeys = <<<KEYS

\$("#grid").jqGrid('bindKeys', {"onEnter":function( rowid ) {
    alert("You enter a row with id:"+rowid + rowData.name);
} } );
KEYS;
$grid->setJSCode($bindkeys);
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$DB = null;
开发者ID:sangikumar,项目名称:IP,代码行数:31,代码来源:clr_application.php

示例6: jqGridRender

<?php

require_once $_SERVER["DOCUMENT_ROOT"] . "/ip-includes/gridincludes.php";
$grid = new jqGridRender($DB);
$grid->SelectCommand = 'select distinct CONCAT("www.", SUBSTRING(email FROM instr(email, "@")+1)) url, email, positiondate from (select vendor1email as email, positiondate from position where vendor1email is not null union select vendor2email, positiondate from position where vendor2email is not null union select vendor3email, positiondate from position where vendor3email is not null union select client1email, null from interview where client1email is not null union select client2email, null from interview where client2email is not null union select client3email, null from interview where client3email is not null union select vendor1email, interviewdate from interview where vendor1email is not null union select vendor2email, interviewdate from interview where vendor2email is not null union select vendor3email, interviewdate from interview where vendor3email is not null) e ';
$grid->dataType = 'json';
$grid->setColModel();
$grid->setUrl('../grids/newvendoremail.php');
$grid->setColProperty("url", array("editable" => false, "width" => 300, "fixed" => true, "formatter" => "link", "editrules" => array("url" => true, "required" => false), "label" => "URL"));
$grid->setColProperty("email", array("editable" => true, "width" => 500, "fixed" => true, "formatter" => "email", "editrules" => array("email" => true, "required" => true), "label" => "Email"));
$grid->setColProperty("positiondate", array("editable" => false, "hidden" => true, "label" => "ID"));
// Set alternate background using altRows property
$grid->setGridOptions(array("sortable" => true, "width" => 1024, "height" => 250, "caption" => "New Vendor Emails Management", "rownumbers" => true, "rowNum" => 100, "shrinkToFit" => false, "sortname" => "positiondate", "sortorder" => "desc", "toppager" => true, "rowList" => array(10, 100, 500, 1000)));
$grid->showError = true;
$grid->navigator = true;
$grid->setNavOptions('navigator', array("pdf" => true, "excel" => true, "add" => false, "edit" => false, "del" => false, "view" => true, "search" => true));
$grid->setNavOptions('view', array("width" => 750, "dataheight" => 500, "viewCaption" => "New Vendor Email Management"));
$grid->callGridMethod('#grid', 'setFrozenColumns');
$grid->callGridMethod('#grid', 'gridResize');
$bindkeys = <<<KEYS
\$("#grid").jqGrid('bindKeys', {"onEnter":function( rowid ) { alert("You enter a row with id:"+rowid)} } );
KEYS;
$grid->setJSCode($bindkeys);
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$DB = null;
开发者ID:sangikumar,项目名称:IP,代码行数:25,代码来源:newvendoremail.php

示例7: array

$grid->setColProperty('svi_horario', array("editable" => true, "width" => 67, "label" => "Horario", "edittype" => "select", "editoptions" => array("value" => "Cualquier horario:Cualquier horario;Mañana:Mañana;Tarde:Tarde;Noche:Noche")));
$grid->setColProperty('svi_fecha_salida', array("editable" => true, "width" => 45, "label" => "Salida"));
$grid->setColProperty('svi_noches_hospedaje', array("editable" => true, "width" => 35, "label" => "Noches"));
$grid->setColProperty('svi_monto_peaje', array("editable" => true, "width" => 35, "label" => "Peaje"));
$grid->setColProperty('svi_nombre_hotel', array("editable" => true, "width" => 60, "label" => "Hotel"));
$grid->setColProperty('svi_monto_hospedaje', array("editable" => true, "width" => 40, "label" => "\$ Hotel"));
$grid->setColProperty('svi_hotel', array("editable" => true, "width" => 35, "label" => "Tipo Hab.", "edittype" => "select", "editoptions" => array("value" => "1:Doble;0:Sencilla")));
//$grid->setColProperty("CustomerID",array("editoptions"=>array("value"=>"1:One;2:Two")));
$grid->setColProperty("svi_fecha_salida", array("formatter" => "date", "formatoptions" => array("srcformat" => "Y-m-d", "newformat" => "d/m/Y"), "search" => false, "editable" => true, "editoptions" => array("dataInit" => "js:function(elm){setTimeout(function(){\n                    jQuery(elm).datepicker({dateFormat:'dd/mm/yy'});\n                    jQuery('.ui-datepicker').css({'font-size':'85%'});\n                },200);}")));
/*$grid->setColProperty("BirthDate", array(
    "formatter"=>"date",
    "formatoptions"=>array("srcformat"=>"Y-m-d H:i:s","newformat"=>"d/m/Y"),
    "search"=>false,
    "editable"=>true
    )
);*/
/*$grid->setColProperty('BirthDate', 
  array("formatter"=>"date","formatoptions"=>array("srcformat"=>"Y-m-d H:i:s", "newformat"=>"d-m-Y")));*/
//**********Anexadoo ---- $grid->setSelect('FirstName', "SELECT FirstName, FirstName FROM employees");
// Set some grid options
/*$grid->setGridOptions(array(
    "rowNum"=>10,
    "rowList"=>array(10,20,30),
    "sortname"=>"tramites.t_id"
));*/
$grid->navigator = true;
$grid->setNavOptions('navigator', array("add" => false, "edit" => true, "del" => false, "excel" => false, "search" => false, "refresh" => false));
$grid->setNavOptions('edit', array("height" => 150, "dataheight" => "auto"));
// Enjoy
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$conn = null;
开发者ID:hackdracko,项目名称:envasadoras,代码行数:31,代码来源:gridEdition_cxp.php

示例8: function

\t\t\t\turl: 'city.php',
\t\t\t\tdataType: 'json',
\t\t\t\tdata: {q:cntryval},
\t\t\t\tsuccess : function(response)
\t\t\t\t{
\t\t\t\t\tvar t="";
\t\t\t\t\tjQuery.each(response, function(i,item) {
\t\t\t\t\t\tt += "<option value='"+item.id+"'>"+item.value+"</option>";
\t\t\t\t\t});
\t\t\t\t\tjQuery("#City",formid).append(t).removeAttr("disabled");
\t\t\t\t}
\t\t\t});
\t\t}
\t});
}
INITFORM;
// Enable navigator
$grid->navigator = true;
// Enable only editing
$grid->setNavOptions('navigator', array("excel" => false, "add" => true, "edit" => true, "del" => false, "view" => false, "search" => false));
// Close the dialog after editing
$grid->setNavOptions('edit', array("closeAfterEdit" => true, "editCaption" => "Update Customer", "bSubmit" => "Update", "viewPagerButtons" => false));
// Bind the before show Form event in add and edit mode.
$grid->setNavEvent('edit', 'beforeShowForm', $beforeshow);
$grid->setNavEvent('add', 'beforeShowForm', $beforeshow);
// Bind the initialize Form event in add and edit mode.
$grid->setNavEvent('edit', 'onInitializeForm', $initform);
$grid->setNavEvent('add', 'onInitializeForm', $initform);
// Enjoy
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$conn = null;
开发者ID:nong053,项目名称:prototype-nnit,代码行数:31,代码来源:grid.php

示例9: array

// Let the grid create the model
$grid->setColModel(null, null, $labels);
$grid->setColProperty('id', array('hidden' => true));
$grid->setColProperty('disabled', array('width' => '50', "edittype" => "select"));
$grid->setColProperty('body', array("edittype" => "textarea", "editoptions" => array("rows" => 2, "cols" => 40), "width" => 200));
$grid->setColProperty('pattern', array("edittype" => "textarea", "editoptions" => array("rows" => 1, "cols" => 40), "width" => 200));
// Set the url from where we obtain the data
$grid->setUrl('includes/grid/email_alerts.php');
$grid->addCol(array("name" => "Actions", "formatter" => "actions", "editable" => false, "sortable" => false, "resizable" => false, "fixed" => true, "width" => 60, "formatoptions" => array("keys" => true)), "first");
// Set some grid options
$grid->setGridOptions(array("rowNum" => 18, "sortname" => "id", "sortorder" => "asc", "altRows" => true, "rowList" => array(20, 40, 60, 75, 100), "forceFit" => true));
$choices = array("Yes" => "Yes", "No" => "No");
// $grid->setSelect("disabled", $choices , false, false, true, array(""=>"All"));
$grid->setSelect("disabled", $choices, false, true, true, array("" => "All"));
$grid->navigator = true;
$grid->setNavOptions('navigator', array("pdf" => true, "excel" => true, "add" => true, "edit" => false, "del" => false, "view" => false, "search" => true));
$grid->setNavOptions('edit', array("width" => "auto", "height" => "auto", "dataheight" => "auto", "top" => 200, "left" => 200));
$grid->setNavOptions('add', array("width" => "auto", "height" => "auto", "dataheight" => "auto", "top" => 200, "left" => 200));
$custom = <<<CUSTOM


        var modalWidth = \$("#portlet_Email_Alerts").width();
        var modalHeight = \$("#portlet_Email_Alerts").height() - 52;
        \$('#triggergrid').jqGrid('setGridWidth',modalWidth);
        \$('#triggergrid').jqGrid('setGridHeight',modalHeight);
        \$('#triggergrid').fluidGrid({base:'#portlet_Email_Alerts', offset:-25});

\$(window).resize(function()
{
        \$('#triggergrid').fluidGrid({base:'#portlet_Email_Alerts', offset:-25});
});
开发者ID:Russell-IO,项目名称:php-syslog-ng,代码行数:31,代码来源:email_alerts.php

示例10: array

$grid->setColProperty("recruiteremail", array("editable" => false, "frozen" => true, "label" => "recruiteremail"));
$grid->setColProperty("manageremail", array("editable" => false, "frozen" => true, "label" => "manageremail"));
$grid->setColProperty("managerphone", array("editable" => false, "frozen" => true, "label" => "managerphone"));
$grid->setColProperty("secondaryname", array("editable" => false, "frozen" => true, "label" => "secondaryname"));
$grid->setColProperty("secondaryemail", array("editable" => false, "frozen" => true, "label" => "secondaryemail"));
$grid->setColProperty("secondaryphone", array("editable" => false, "frozen" => true, "label" => "secondaryphone"));
$grid->setColProperty("status", array("editable" => true, "width" => 70, "hidden" => true, "editrules" => array("edithidden" => true, "required" => false), "fixed" => true, "label" => "Status", "edittype" => "select"));
$grid->setSelect("status", $invoicestatus, false, true, true, array("" => "All"));
$grid->setColProperty("remindertype", array("editable" => true, "width" => 200, "hidden" => true, "editrules" => array("edithidden" => true, "required" => false), "fixed" => true, "label" => "Reminder Type", "edittype" => "select"));
$grid->setSelect("remindertype", array("Open" => "Open", "Warning" => "Warning", "Warn-Candidate" => "Warn-Candidate", "Warn-Client" => "Warn-Client", "Warn-CollectionAgency" => "Warn-CollectionAgency", "Final-Warning" => "Final-Warning"), false, true, true, array("" => "All"));
$grid->setColProperty("amountreceived", array("editable" => true, "width" => 150, "hidden" => true, "editrules" => array("edithidden" => true, "required" => false), "fixed" => true, "formatter" => "currency", "formatoptions" => array("decimalPlaces" => 2, "thousandsSeparator" => ",", "prefix" => "\$"), "label" => "Received"));
$grid->setColProperty("releaseddate", array("formatter" => "date", "width" => 120, "hidden" => true, "editrules" => array("edithidden" => true, "required" => false), "fixed" => true, "formatoptions" => array("srcformat" => "Y-m-d", "newformat" => "Y-m-d"), "editable" => true, "label" => "Released Date", "editoptions" => array("dataInit" => "js:function(elm){setTimeout(function(){\n                    \t\t\t\t\t\t\t jQuery(elm).datepicker({dateFormat:'yy-mm-dd'});\n                    \t\t\t\t\t\t\t jQuery('.ui-datepicker').css({'font-size':'75%'});\n                \t\t\t\t\t\t\t\t\t },200);}"), "searchoptions" => array("dataInit" => "js:function(elm){setTimeout(function(){\n                    \t\t\t\t\t\t\t jQuery(elm).datepicker({dateFormat:'yy-mm-dd'});\n                    \t\t\t\t\t\t\t jQuery('.ui-datepicker').css({'font-size':'75%'});\n                \t\t\t\t\t\t\t\t\t },200);}")));
$grid->setColProperty("receiveddate", array("formatter" => "date", "width" => 120, "hidden" => true, "editrules" => array("edithidden" => true, "required" => false), "fixed" => true, "formatoptions" => array("srcformat" => "Y-m-d", "newformat" => "Y-m-d"), "editable" => true, "label" => "Received Date", "editoptions" => array("dataInit" => "js:function(elm){setTimeout(function(){\n                    \t\t\t\t\t\t\t jQuery(elm).datepicker({dateFormat:'yy-mm-dd'});\n                    \t\t\t\t\t\t\t jQuery('.ui-datepicker').css({'font-size':'75%'});\n                \t\t\t\t\t\t\t\t\t },200);}"), "searchoptions" => array("dataInit" => "js:function(elm){setTimeout(function(){\n                    \t\t\t\t\t\t\t jQuery(elm).datepicker({dateFormat:'yy-mm-dd'});\n                    \t\t\t\t\t\t\t jQuery('.ui-datepicker').css({'font-size':'75%'});\n                \t\t\t\t\t\t\t\t\t },200);}")));
$grid->setColProperty("checknumber", array("editable" => true, "frozen" => true, "width" => 100, "hidden" => true, "editrules" => array("edithidden" => true, "required" => false), "fixed" => true, "label" => "Check No."));
$grid->setColProperty("invoiceurl", array("editable" => true, "frozen" => true, "width" => 200, "hidden" => true, "editrules" => array("edithidden" => true, "required" => false), "editoptions" => array("size" => 75, "maxlength" => 200), "formatter" => "link", "formatoptions" => array("target" => "_blank"), "fixed" => true, "editrules" => array("url" => true, "required" => false), "label" => "Invoice Url"));
$grid->setColProperty("checkurl", array("editable" => true, "frozen" => true, "width" => 200, "hidden" => true, "editrules" => array("edithidden" => true, "required" => false), "editoptions" => array("size" => 75, "maxlength" => 200), "formatter" => "link", "formatoptions" => array("target" => "_blank"), "fixed" => true, "editrules" => array("url" => true, "required" => false), "label" => "Check Url"));
$grid->setColProperty("notes", array("editable" => true, "width" => 400, "fixed" => true, "hidden" => true, "edittype" => "textarea", "editrules" => array("edithidden" => true, "required" => false), "editoptions" => array("rows" => 6, "cols" => 60), "label" => "Notes"));
$grid->setGridOptions(array("sortable" => true, "width" => 1024, "height" => 250, "caption" => "Invoice Overdue Management", "rownumbers" => true, "rowNum" => 100, "sortname" => "expecteddate", "sortorder" => "desc", "footerrow" => true, "userDataOnFooter" => true, "shrinkToFit" => false, "toppager" => true, "rowList" => array(10, 100, 500)));
$grid->showError = true;
$grid->navigator = true;
$grid->setNavOptions('navigator', array("pdf" => true, "excel" => true, "add" => false, "edit" => true, "del" => false, "view" => true, "search" => true));
$grid->setNavOptions('view', array("width" => 700, "dataheight" => 300, "viewCaption" => "Invoice Overdue Management"));
$grid->setNavOptions('edit', array("width" => 700, "dataheight" => 300, "closeOnEscape" => true, "closeAfterEdit" => true, "editCaption" => "Update Invoice", "reloadAfterSubmit" => false));
$grid->callGridMethod('#grid', 'setFrozenColumns');
$grid->callGridMethod('#grid', 'gridResize');
$bindkeys = <<<KEYS
\$("#grid").jqGrid('bindKeys', {"onEnter":function( rowid ) { alert("You enter a row with id:"+rowid)} } );
KEYS;
$grid->setJSCode($bindkeys);
$grid->renderGrid('#grid', '#pager', true, $summaryrows, null, true, true);
$DB = null;
开发者ID:sangikumar,项目名称:IP,代码行数:31,代码来源:invoiceoverdue.php

示例11: jqGridRender

// Tell the db that we use utf-8
$conn->query("SET NAMES utf8");
// Create the jqGrid instance
$grid = new jqGridRender($conn);
// Write the SQL Query
$grid->SelectCommand = 'SELECT EmployeeID, FirstName, LastName, BirthDate FROM employees';
// Set the table to where you add the data
$grid->table = 'employees';
// Set output format to json
$grid->dataType = 'json';
// Let the grid create the model
$grid->setColModel();
// Set the url from where we obtain the data
$grid->setUrl('grid.php');
$grid->setColProperty('EmployeeID', array("editable" => false));
$grid->setColProperty('BirthDate', array("formatter" => "date", "formatoptions" => array("srcformat" => "Y-m-d H:i:s", "newformat" => "Y-m-d")));
// Set some grid options
$grid->setUserTime("m/d/Y");
$grid->setDatepicker("BirthDate", array("buttonOnly" => false));
$grid->setGridOptions(array("rowNum" => 10, "rowList" => array(10, 20, 30), "sortname" => "EmployeeID"));
// navigator first should be enabled
$grid->navigator = true;
$grid->setNavOptions('navigator', array("add" => false, "edit" => false, "excel" => false, "search" => false, "del" => false, "refresh" => false));
// and just enable the inline
$grid->inlineNav = true;
// disable editing - just adding
$grid->inlineNavOptions('navigator', array("edit" => false));
$grid->callGridMethod("#grid", 'setFrozenColumns');
// Enjoy
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$conn = null;
开发者ID:nong053,项目名称:prototype-nnit,代码行数:31,代码来源:grid.php

示例12: array

$grid->setColProperty("relocation", array("editable" => true, "width" => 70, "fixed" => true, "label" => "Relocation", "edittype" => "select"));
$grid->setSelect("relocation", $yesno, false, true, true, array("" => "All"));
$grid->setColProperty("closedate", array("formatter" => "date", "width" => 80, "fixed" => true, "formatoptions" => array("srcformat" => "Y-m-d", "newformat" => "Y-m-d"), "editable" => true, "label" => "Close Date", "editoptions" => array("dataInit" => "js:function(elm){setTimeout(function(){\n                    \t\t\t\t\t\t\t jQuery(elm).datepicker({dateFormat:'yy-mm-dd'});\n                    \t\t\t\t\t\t\t jQuery('.ui-datepicker').css({'font-size':'75%'});\n                \t\t\t\t\t\t\t\t\t },200);}"), "searchoptions" => array("dataInit" => "js:function(elm){setTimeout(function(){\n                    \t\t\t\t\t\t\t jQuery(elm).datepicker({dateFormat:'yy-mm-dd'});\n                    \t\t\t\t\t\t\t jQuery('.ui-datepicker').css({'font-size':'75%'});\n                \t\t\t\t\t\t\t\t\t },200);}")));
$grid->setColProperty("suspensionreason", array("editable" => true, "width" => 70, "fixed" => true, "label" => "Reason", "edittype" => "select"));
$grid->setSelect("suspensionreason", array("B" => "Break", "D" => "Discontinued", "X" => "Defaulted"), false, true, true, array("" => "All"));
$grid->setColProperty("resumelink", array("editable" => false, "width" => 200, "formatter" => "link", "fixed" => true, "editrules" => array("url" => true), "label" => "Resume Link"));
$grid->setColProperty("ipemailid", array("editable" => true, "width" => 150, "fixed" => true, "formatter" => "email", "label" => "IP Email", "edittype" => "select"));
$grid->setSelect("ipemailid", "select '' as id, '' as name from dual union SELECT distinct id, email as name FROM ipemail where email is not null order by name");
$grid->setColProperty("ipphone", array("editable" => false, "width" => 150, "fixed" => true, "label" => "IP Phone"));
$grid->setColProperty("skypeid", array("editable" => false, "width" => 100, "fixed" => true, "label" => "Skype"));
$grid->setColProperty("resumeid", array("editable" => true, "frozen" => true, "width" => 150, "fixed" => true, "label" => "Resume ID", "edittype" => "select"));
$grid->setSelect("resumeid", "select '' as id, '' as name from dual union SELECT distinct cr.id, concat(c.name, ' ', r.resumekey) as name FROM resume r, candidateresume cr, candidate c where r.id = cr.resumeid and c.candidateid = cr.candidateid order by name");
$grid->setColProperty("intro", array("editable" => true, "hidden" => true, "edittype" => "textarea", "editrules" => array("edithidden" => true, "required" => false), "editoptions" => array("rows" => 6, "cols" => 80), "label" => "Intro"));
$grid->setColProperty("notes", array("editable" => true, "hidden" => true, "edittype" => "textarea", "editrules" => array("edithidden" => true, "required" => false), "editoptions" => array("rows" => 6, "cols" => 80), "label" => "Notes"));
// Set alternate background using altRows property
$grid->setGridOptions(array("sortable" => true, "width" => 1024, "height" => 500, "caption" => "Marketing List", "rownumbers" => true, "rowNum" => 100, "sortname" => "mmid desc, priority", "sortorder" => "asc", "toppager" => true, "rowList" => array(10, 20, 30, 50, 100, 500)));
//$grid->showError = true;
$grid->navigator = true;
//$grid->toolbarfilter = true;
//$grid->setFilterOptions(array("searchOperators"=>true));
$grid->setNavOptions('navigator', array("pdf" => true, "excel" => true, "add" => false, "edit" => true, "del" => false, "view" => true, "search" => true));
$grid->setNavOptions('view', array("width" => 750, "dataheight" => 500, "viewCaption" => "Marketing Management"));
$grid->callGridMethod('#grid', 'setFrozenColumns');
$grid->callGridMethod('#grid', 'gridResize');
$grid->setNavOptions('edit', array("width" => 750, "dataheight" => 500, "closeOnEscape" => true, "closeAfterEdit" => true, "editCaption" => "Update Candidate", "reloadAfterSubmit" => false));
$bindkeys = <<<KEYS
\$("#grid").jqGrid('bindKeys', {"onEnter":function( rowid ) { alert("You enter a row with id:"+rowid)} } );
KEYS;
$grid->setJSCode($bindkeys);
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$DB = null;
开发者ID:sangikumar,项目名称:IP,代码行数:31,代码来源:rcmarketing.php

示例13: array

$table = 'products';
$grid->SelectCommand = 'SELECT * FROM ' . $table;
// set the ouput format to XML
$grid->dataType = 'json';
// Let the grid create the model
$grid->setPrimaryKeyId("ProductID");
$grid->setColModel();
$grid->table = $table;
// set labels in the header
$grid->setColProperty("ProductID", array("label" => "ID"));
$grid->setColProperty("ProductName", array("label" => "Name"));
$grid->setColProperty("QuantityPerUnit", array("label" => "Unit"));
$grid->setColProperty("UnitPrice", array("label" => "Unit Price"));
// We can hide some columns
$grid->setColProperty("SupplierID", array("hidden" => true));
$grid->setColProperty("CategoryID", array("hidden" => true));
$grid->setColProperty("UnitsOnOrder", array("hidden" => true));
$grid->setColProperty("ReorderLevel", array("hidden" => true));
$grid->setColProperty("Discontinued", array("hidden" => true));
// Set the url from where we obtain the data
$grid->setUrl('grid.php');
// Set some grid options
$grid->setGridOptions(array("rowNum" => 10, "rowList" => array(10, 20, 30), "sortname" => "CategoryID"));
// Enable toolbar searching
$grid->toolbarfilter = true;
$grid->navigator = true;
$grid->setNavOptions('navigator', array("csv" => true, "pdf" => true));
$grid->setFilterOptions(array("stringResult" => true));
// Enjoy
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$conn = null;
开发者ID:jewelhuq,项目名称:FoodBankBooking,代码行数:31,代码来源:grid.php

示例14: array

$grid->setColProperty("client", array("editable" => true, "width" => 90, "fixed" => true, "editoptions" => array("size" => 75, "maxlength" => 200), "label" => "Client"));
$grid->setAutocomplete("client", null, "select companyname from (select c.companyname from client c union select distinct client from position) p  where companyname like ? ORDER BY companyname", null, true, true);
$grid->setColProperty("vendor2email", array("editable" => true, "width" => 200, "fixed" => true, "formatter" => "email", "editoptions" => array("size" => 75, "maxlength" => 200), "editrules" => array("email" => true, "required" => false), "label" => "Vendor2 Email"));
$grid->setAutocomplete("vendor2email", "#vendor2", "select email, email, vendor2 from (select r.email, (select companyname from vendor where id = r.vendorid) vendor2 from recruiter r union select distinct vendor1email as email, vendor1 from position) p where email like ? ORDER BY email", null, true, true);
$grid->setColProperty("vendor2", array("editable" => true, "width" => 90, "fixed" => true, "editoptions" => array("size" => 75, "maxlength" => 200), "label" => "Vendor2"));
$grid->setColProperty("vendor2", array("editable" => true, "width" => 90, "fixed" => true, "editoptions" => array("size" => 75, "maxlength" => 200), "label" => "Vendor2"));
$grid->setAutocomplete("vendor2", null, "select companyname from (select v.companyname from vendor v union select c.companyname from client c union select distinct vendor1 from position) p  where companyname like ? ORDER BY companyname", null, true, true);
$grid->setColProperty("vendor3email", array("editable" => true, "width" => 200, "fixed" => true, "formatter" => "email", "editoptions" => array("size" => 75, "maxlength" => 200), "editrules" => array("email" => true, "required" => false), "label" => "Vendor3 Email"));
$grid->setAutocomplete("vendor3email", "#vendor3", "select email, email, vendor3 from (select r.email, (select companyname from vendor where id = r.vendorid) vendor3 from recruiter r union select distinct vendor1email as email, vendor1 from position) p where email like ? ORDER BY email", null, true, true);
$grid->setColProperty("vendor2", array("editable" => true, "width" => 90, "fixed" => true, "editoptions" => array("size" => 75, "maxlength" => 200), "label" => "Vendor2"));
$grid->setColProperty("vendor3", array("editable" => true, "width" => 90, "fixed" => true, "editoptions" => array("size" => 75, "maxlength" => 200), "label" => "Vendor3"));
$grid->setAutocomplete("vendor3", null, "select companyname from (select v.companyname from vendor v union select c.companyname from client c union select distinct vendor1 from position) p  where companyname like ? ORDER BY companyname", null, true, true);
$grid->setColProperty("rate", array("editable" => true, "width" => 90, "formatter" => "currency", "formatoptions" => array("decimalPlaces" => 2, "thousandsSeparator" => ",", "prefix" => "\$"), "sorttype" => "currency", "fixed" => true, "label" => "Rate"));
$grid->setColProperty("reference", array("editable" => true, "width" => 90, "fixed" => true, "editoptions" => array("size" => 75, "maxlength" => 200), "label" => "References"));
$grid->setColProperty("notes", array("editable" => true, "width" => 70, "fixed" => true, "edittype" => "textarea", "editoptions" => array("rows" => 6, "cols" => 80), "label" => "Notes"));
// Set alternate background using altRows property
$grid->setGridOptions(array("sortable" => true, "width" => 1024, "height" => 250, "caption" => "Position List", "rownumbers" => true, "rowNum" => 100, "shrinkToFit" => false, "sortname" => "positiondate", "sortorder" => "desc", "toppager" => true, "rowList" => array(100, 500, 1000, 5000)));
$grid->showError = true;
$grid->navigator = true;
$grid->setNavOptions('navigator', array("pdf" => true, "excel" => true, "add" => true, "edit" => true, "del" => false, "view" => true, "search" => true));
$grid->setNavOptions('view', array("width" => 750, "dataheight" => 500, "viewCaption" => "Position List"));
$grid->setNavOptions('add', array("width" => 750, "dataheight" => 500, "closeOnEscape" => true, "closeAfterAdd" => true, "addCaption" => "Add Position", "reloadAfterSubmit" => false));
$grid->setNavOptions('edit', array("width" => 750, "dataheight" => 500, "closeOnEscape" => true, "closeAfterEdit" => true, "editCaption" => "Update Position", "reloadAfterSubmit" => false));
$grid->callGridMethod('#grid', 'setFrozenColumns');
$grid->callGridMethod('#grid', 'gridResize');
$bindkeys = <<<KEYS
\$("#grid").jqGrid('bindKeys', {"onEnter":function( rowid ) { alert("You enter a row with id:"+rowid)} } );
KEYS;
$grid->setJSCode($bindkeys);
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$DB = null;
开发者ID:sangikumar,项目名称:IP,代码行数:31,代码来源:rposition.php

示例15: jqGridRender

<?php

require_once $_SERVER["DOCUMENT_ROOT"] . "/ip-includes/gridincludes.php";
$grid = new jqGridRender($DB);
$grid->SelectCommand = 'select id, review from fake_review ';
$grid->table = 'fake_review';
$grid->gSQLMaxRows = 100000;
$grid->setPrimaryKeyId('id');
$grid->serialKey = false;
$grid->dataType = 'json';
$grid->setColModel();
$grid->setUrl('../grids/fakereview.php');
$grid->setColProperty("id", array("editable" => false, "hidden" => true, "label" => "ID"));
$grid->setColProperty("review", array("editable" => true, "width" => 400, "fixed" => true, "edittype" => "textarea", "editoptions" => array("rows" => 6, "cols" => 60), "label" => "Reviews"));
$grid->setGridOptions(array("sortable" => true, "width" => 1024, "height" => 250, "caption" => "Fake Reviews Management", "rownumbers" => true, "rowNum" => 1000, "shrinkToFit" => false, "sortname" => "id", "sortorder" => "asc", "toppager" => true, "rowList" => array(10, 100, 500, 1000, 10000)));
$grid->showError = true;
$grid->navigator = true;
$grid->setNavOptions('navigator', array("pdf" => true, "excel" => true, "add" => true, "edit" => true, "del" => false, "view" => true, "search" => true));
$grid->setNavOptions('view', array("width" => 750, "dataheight" => 250, "viewCaption" => "Fake Reviews Management"));
$grid->setNavOptions('add', array("width" => 750, "dataheight" => 250, "closeOnEscape" => true, "closeAfterAdd" => true, "addCaption" => "Add Fake Review", "reloadAfterSubmit" => false));
$grid->setNavOptions('edit', array("width" => 750, "dataheight" => 250, "closeOnEscape" => true, "closeAfterEdit" => true, "editCaption" => "Edit Fake Review", "reloadAfterSubmit" => false));
//$grid->toolbarfilter = true;
$grid->callGridMethod('#grid', 'setFrozenColumns');
$grid->callGridMethod('#grid', 'gridResize');
$bindkeys = <<<KEYS
\$("#grid").jqGrid('bindKeys', {"onEnter":function( rowid ) { alert("You enter a row with id:"+rowid)} } );
KEYS;
$grid->setJSCode($bindkeys);
$grid->renderGrid('#grid', '#pager', true, null, null, true, true);
$DB = null;
开发者ID:sangikumar,项目名称:IP,代码行数:30,代码来源:fakereview.php


注:本文中的jqGridRender::setNavOptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。