:: General Questions General Questions articles access $data in $grid["edit_options"]["afterShowForm"] = 'function (form) Hello I hope you can help me. I have successfully created a function for "on_after_insert" which need access to $data attributes of the current selected object. Now I created a custom button for add/edit form and I want to call this function by clicking this button. How can I handle this? Sat, 24 Feb 2018 01:14:28 +0000 access $data array Hello please help me, I know, that I can access data of acutall object by $data array. The string returned by phpgrid_error($data) looks like this: "Array ( [idHardware] => 135 [params] => Array ( [idHardware] => [Artikelbezeichnung] => frfref" I want to get "135" back from [idHardware], but this value is empty under $data["params"]["idHardware"] How can I access $data[0] (int index doesn't work) Wed, 21 Feb 2018 14:03:31 +0000 Edit functionality not working fine Hello, I have a grid with 4 date fields in a row. When I press the button to edit a row (the one in the bottom left corner) and try to edit all the dates, it doesn't work. The mouse cursor stays in the first calendar field. I cant modify the rest of the fields, all the dates that I choose for the other date fields, they go into the first one. Thank you and regards, Alberto Tue, 20 Feb 2018 17:46:44 +0000 Conditional Hello, I want to give a cell a value if its empty. How would be the best way of doing that condition? Thank you and regards. Thu, 15 Feb 2018 18:52:47 +0000 Tag it to insert new row, or from foreign table Hello, There is a way to insert rows, then while I'm inserting row it show me possible data to insert, else let me to insert row. Thank you Wed, 14 Feb 2018 14:37:33 +0000 No Editable but Viewable on Add Hi, is there any way to have a field that is not editable but still viewable when add dialog box is displayed? I tried something without success. For example: $col_detail_prac = array(); $col_detail_prac["title"] = $WORDING_STUDENT; $col_detail_prac["name"] = "IDStud"; $col_detail_prac["search"] = true; $col_detail_prac["editable"] = false; $col_detail_prac["editrules"] = array("required"=>true); $col_detail_prac["show"] = array("list"=>true,"view"=>true,"edit"=>true,"add"=>true); $cols_detail_prac[] = $col_detail_prac; Also can this field have a value behind and a different string in front view like the select type of field but without being select? For example: $str_stud = $jqgrid->get_dropdown_values("SELECT DISTINCT IDNumb as k, Plat as v FROM student"); $col_detail_prac["editoptions"] = array("value" => $str_stud, "separator" => ":", "delimiter" => ";"); Fri, 16 Feb 2018 00:43:41 +0000 Detail Caption Update on Master change Hi, is there any way to update the caption of child grid when using tab-master-detail based on selected record of master's grid? For example when a user changes the selected record on master grid the property "caption" of detail grid must change -> $grid_detail_jott["caption"] = "ID:"."-".intval($_GET["IDNumb"]); Mon, 12 Feb 2018 18:43:08 +0000 RowNumbers Hi, when using the rowNumbers -> $grid_master["rownumbers"] = true; The numbers are displayed up to 9, after nine number, i get ... instead of 10, 11, ... Mon, 12 Feb 2018 17:10:51 +0000 Center-Top form on edit Hi Abu, Is possible to center on top form on edit? My config: $Opciones["edit_options"] = array('width'=>'100%'); $Opciones["form"]["position"] = "top"; Thanks Mike Mon, 12 Feb 2018 17:37:45 +0000 Conditional cell css depending on the value of another cell Conditional cell css depending on the value of another cell. I have to change the background color of one cell if the value of another cell in other column is X. Both cells are is the same row. Mon, 12 Feb 2018 18:11:38 +0000 Accent problem We would like to buy your grid. We are currently testing and we are seeing a problem. If a grid has fields that contain accented characters, the grid's features stop working. If there are no accents everything works perfectly define("PHPGRID_DBTYPE","odbc_mssql"); // mysql,oci8(for oracle),mssql,postgres,sybase define("PHPGRID_DBHOST","Driver={SQL Server};\sqlinfo2008r2;Database=SupportInfo;CharacterSet=utf-8"); define("PHPGRID_DBUSER","xxxxxxx"); define("PHPGRID_DBPASS","xxxxxxxx"); define("PHPGRID_DBNAME","SupportInfo"); Thank you Thu, 08 Feb 2018 14:01:29 +0000 Grid inside div Hi Abu, I am trying to load grid php file inside div, my configuration: Main page with link: Revendedores Main page with div Main page with javascript $(function() { $("a.ajax-link").on("click", function(e) { e.preventDefault(); $("#loaded_content").load(this.href); }); }); If i try to load clientes.php from browser it loads perfect, showing all records, when i try inside div no records shown. What i'm doing wrong? thanks in advance Mike Sun, 11 Feb 2018 23:08:39 +0000 Different Action on Delete Using the Grid, i can set up some events for user operations like: -$e["on_insert"] = array("prac_add_student", null, true); -$e["on_update"] = array("prac_update_student", null, true); -$e["on_delete"] = array("prac_delete_student", null, true); When i have a custom delete function the delete operation happens whatever i have in the custom delete function. The requirement is to change a flag in database field from 0 as existing to 1 as deleted and not delete the record when delete icon is pressed. Can this be done? Thanks Fri, 02 Feb 2018 18:06:29 +0000 Multiselect in form with dependent dropdowns Hi, Has anyone been able to have a multiselect field that updates a dependent field? Currently the dependent field only shows values from the first selected value in the master field. Below are the columns with the multiselect (Master) and the dependent field (Dependent). // COLUMN: Master $col = array(); $col['name'] = 'master'; $col['title'] = 'Master'; $col['export'] = true; $col['hidden'] = false; $col['editable'] = true; $col['edittype'] = "select"; $str = $grid->get_dropdown_values("select master_id as k, master as v from v_get_master where field_type = 'master' and active = 1"); $col['editoptions'] = array("value"=>$str); $col['editoptions']['multiple'] = true; $col["editoptions"]["dataInit"] = "function(){ setTimeout(function(){ link_select2('{$col['name']}'); },200); }"; $col["editoptions"]["onload"]["sql"] = "select master_id as k, master as v from v_get_master where field_type = 'master' and active = 1"; $col["editoptions"]["onchange"]["sql"] = "select dependent_id as k, concat(master, ' - ', dependent) as v from v_get_dependent where master_id IN ({master})"; $col["editoptions"]["onchange"]["update_field"] = "dependent"; $col['editrules']['required'] = true; $cols[] = $col; // COLUMN: Dependent $col = array(); $col['name'] = 'dependent'; $col['title'] = 'Dependent'; $col['export'] = true; $col['hidden'] = false; $col['align'] = 'center'; $col['editable'] = true; $col['edittype'] = "select"; $str = $grid->get_dropdown_values("select dependent_id as k, concat(master, ' - ', dependent) as v from v_get_dependent where master_id IN ({master})"); $col['editoptions'] = array("value"=>":;".$str); $col['editoptions']['multiple'] = true; $col["editoptions"]["dataInit"] = "function(){ setTimeout(function(){ link_select2('{$col['name']}'); },200); }"; $col["editoptions"]["onload"]["sql"] = "select master_id as k, master as v from v_get_master where field_type = 'master' and active = 1"; $col['editrules']['required'] = true; $cols[] = $col; Any help would be greatly appreciated! Mon, 12 Feb 2018 18:18:26 +0000 Can't show grid Hi Abu Ghufran I have a full version 1.4.8 build 105-20130424 and cant show grid. this my ->select_command = "SELECT MAX(INTPAC.ORI) AS oPaciente, MAX(INTPAC.PAC) AS nPaciente, MAX(CLIPAC.NOM) AS Nombre, MAX(CLIPAC.NDO) AS NroDocumento, MAX(CLIPAC.FNA) AS FechaNac, DATEDIFF(year,MAX(CLIPAC.FNA),GETDATE()) AS Edad, MAX(CLINST.DES) AS Institucion, MAX(INTSEC.NOM) AS Sector, MAX(CLISER.NOM) AS Servicio, MAX(CNSRPO.DES) AS Tipo, MAX(CLIPRF.NOM) AS Profesional, MAX(DGI.DES) AS Diagnostico_Ing, MAX(DGE.DES) AS Diagnostico_Egr, MAX(INTPAT.DES) AS Motivo, MAX(CLIPAC.OBS) AS Observacion, MAX(INTPAC.FIN) AS Fecha_ing, MAX(INTPAC.FEG) AS Fecha_egr, MAX(INTPAC.EGR) AS Egreso FROM INTPAC LEFT JOIN CLIPAC ON INTPAC.ORI=CLIPAC.ORI AND INTPAC.PAC=CLIPAC.PAC LEFT JOIN CLINST ON CLIPAC.INS = CLINST.INS LEFT JOIN CLISER ON INTPAC.SVP = CLISER.SER LEFT JOIN CNSRSP ON INTPAC.ORI=CNSRSP.ORI AND INTPAC.PAC=CNSRSP.PAC AND CLIPAC.HCL = CNSRSP.HCL AND CNSRSP.PRG = '465' LEFT JOIN CNSRPO ON CNSRSP.PRG = CNSRPO.PRG AND CNSRSP.RSP_NUM = CNSRPO.RSP LEFT JOIN INTPAT ON CLIPAC.MOT = INTPAT.PAT LEFT JOIN INTPAT DGI ON CLIPAC.DGI_P = DGI.PAT LEFT JOIN INTPAT DGE ON CLIPAC.DGE_P = DGE.PAT LEFT JOIN INTSEC ON INTPAC.SCP = INTSEC.SEC LEFT JOIN CLIPRF ON CNSRSP.PRF = CLIPRF.PRF WHERE INTPAC.SCP IN (SELECT SEC FROM INTSEC WHERE NOM LIKE '%PISO%' OR NOM LIKE '%UTI%' OR NOM LIKE '%UCE%' OR NOM LIKE '%LIMBO%') AND INTPAC.FEG BETWEEN CONVERT(Datetime,'2017-12-01 00:00:00',120) AND CONVERT(Datetime, '2017-12-31 23:59:59', 120) GROUP BY INTPAC.ORI, INTPAC.PAC, CLIPAC.NOM "; Fri, 02 Feb 2018 09:50:24 +0000 Installing phpgrid on plesk I have installed a phpgrid solution (master -> detail structure) on Plesk and everything runs smoothly except for this one thing: - when I try to add a record an error gets thrown (see below; it occurs both on master and detail grid) even if the record, in the end, gets inserted in the database - when I edit the record there is no problem. It may be a permission problem (don't know for sure). Any clue? Thanks Error: HTTP Error 500.0 - Internal Server Error E:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP54\php-cgi.exe - The FastCGI process exited unexpectedly Detailed Error Information Module FastCgiModule Notification ExecuteRequestHandler Handler PHP-php Error Code 0xc0000005 Requested URL Physical Path PATH to httpdocs \httpdocs\lunikgas\tab_sedi.php Logon Method Anonymous Logon User Anonymous Most likely causes: IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred. IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly. IIS was not able to process configuration for the Web site or application. The authenticated user does not have permission to use this DLL. The request is mapped to a managed handler but the .NET Extensibility Feature is not installed. Things you can try: Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account. Check the event logs to see if any additional information was logged. Verify the permissions for the DLL. Install the .NET Extensibility feature if the request is mapped to a managed handler. Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here. Links and More Information This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error. View more information » Microsoft Knowledge Base Articles: 294807 Fri, 02 Feb 2018 10:40:31 +0000 Wildcard Search? Can perform wildcard search? e.g. inline search type "a%e" or "a*e" "apple", "americas" could be the search result but now show nothing Thank you Wed, 31 Jan 2018 18:48:21 +0000 Add/Remove file from multiple file field Hi, I have a multiple file field which I can successfully attach multiple files at once and display these as icons in the grid. What my end users would like is the ability to add more files to this field or delete only some of them after the fact. Currently when editing the field all I see is a "Reset" button which just blanks it out, there is no option to "Add" or "Edit". What we are doing at the moment is downloading all the files to desktop then resetting the field and then reattaching everything. This isn't ideal as it's more time consuming and also leaves copies of the originals on the server. Is there a way to have the "Add" / "Edit" options? Thanks Tue, 13 Feb 2018 03:43:43 +0000 Insert data directly to table using JS code Hello, It's possible to insert data directly to table using (How to post data using JS code) Thank you! Sun, 28 Jan 2018 07:44:00 +0000 Exporting Excel Issue Dear all. i am having some troubles when i try to export to excel, the fie gets download, but when i open the file appears an error saying , is not possible to open xlsx file. Do you know guys how to solve it? Best Regards. Sun, 28 Jan 2018 10:13:54 +0000 Own language to col title Hello, There is a way to create my own language based in col title, for example: $col["title"] = "Estado"; then when change language show it. Thank you! Sun, 28 Jan 2018 07:44:25 +0000 Problem export - displays raw data in the browser window I have three grids in the project. Export to excel from two, works well with third displays results in the browser window :( Identical settings - I have no idea where to look: / Regards Thu, 25 Jan 2018 13:10:30 +0000 Call Update form from external link Hello, Does someone know how to call the update record form from an external link. Let says I have a record with Primary key Id=123. Is it possible to call the grid to directly get the update form. Something like grid.php&mod=update&id=123 Thanks, Cedric Fri, 26 Jan 2018 02:52:25 +0000 PDF Column Width Using the TCPDF with html, when html contains a table with some fixed width columns and one for example auto width column but this column is not in the end but between other columns the PRD is not rendering well. I started to searching the width configuration inside TCPDF classes, i found it bu i think is not being used, i am also searching writeHTML() function but i am unable to find it. Does anyone know where i can find this method? Fri, 26 Jan 2018 02:53:54 +0000 Run php script "on_insert" event Hi, Could you please tell me how to do the following: "on_insert" event, I would like to run an external php script which updates some database fields using external data. Here is part of my script: ... $eg3["on_insert"] = array("add_walletGrid03", null, true); $g3->set_events($eg3); function add_walletGrid03($data) { $id = intval($_GET["rowid"]); $data["params"]["transaction_wallet_id"] = $id; ===> Here is where i would like to run "../my_script.php" } How can I achieve this please ? Tue, 23 Jan 2018 12:56:38 +0000 Stored procedure for insert, update or delete Hello, It's possible this? $h->select_command = "CALL insert_clients"; As you know, CRUD operation would be fastest because will be executed by database management system. Thank you! Mon, 22 Jan 2018 04:00:17 +0000 PDF Charset I am using PDF functionality to export an html page but html page is in "Greek" and all characters are displayed as "?" in exported pdf. How can i change this behavior when using html?. Tue, 23 Jan 2018 14:09:14 +0000 Mess with save When a developer using the file upload column and file view column in the same Grid but by mistake had set same name in these two array columns, when viewing the Grid and tries to reorder the columns ordering by drag and drop them, then column titles deathwatch from column cells and when user saves a Cell A from Column A can be saved in Column B and also the data in database are messing. Seems like the save method works using array ordering with number indexing and not with key indexing... I think it will be safer this to change. Mon, 22 Jan 2018 03:58:04 +0000 Autocomplete Hello, How do write a minimum of characters in the autocomplete?? Fri, 19 Jan 2018 16:05:07 +0000 Is there a way to use source format and new format WITHOUT using the datepicker control? I have a MySQL database with a TIME field (H:i:s). I want to be able to only display and edit the time field in hours and minutes, 17:30 for example. The issue is I do NOT want the datepicker control displayed. I just want to hand key in the value but I only want the hours and minutes displayed (and when editing or adding) in the grid but still update the database as 17:30:00. I tried to code below but it does not work as intended. $col["formatter"] = "datetime"; $col["formatoptions"] = array("srcformat"=>'H:i:s',"newformat"=>'H:i',"opts" => array("timeOnly" => true),"opts" => array("controlType" => 'select')); $col["editrules"] = array("required"=>false); // and is required $cols[] = $col; Mon, 22 Jan 2018 07:19:22 +0000 How to update data using JS code? How to update row using MySQL query for example. Thank you! Fri, 19 Jan 2018 15:54:50 +0000 How to refresh grid on update of dependent dropdown. How to reproduce: 1., select Appearance>Dropdown Country City. 2. Select Punjab from first dropdown. 3. Select Lahore from 2nd dropdown. 4. Now Select Sind from first dropdown, this will reset the 2nd dropdown and '-' is selected in 2nd dropdown as there is no more 'Lahore' in options. But this should also show 'ALL' records for Sind in grid. I've to select some city, and then select the '-' option to show all records of Sind in grid. Can I achieve the desired result? Thanks Thu, 01 Feb 2018 14:22:53 +0000 Using session as var in grid controller Codeigniter Hello, I need to save session user in virtual column of grid controller code: Var: $this->session->userdata('biller_id') Code: loggedIn) { $this->session->set_userdata('requested_page', $this->uri->uri_string()); $this->sma->md('login'); } if (!$this->Owner && !$this->Admin) { $this->session->set_flashdata('warning', lang('access_denied')); redirect($_SERVER["HTTP_REFERER"]); } } public function show_grid() { $db_conf = array(); $db_conf["type"] = "mysqli"; // mysql,oci8(for oracle),mssql,postgres,sybase $db_conf["server"] = "localhost"; $db_conf["user"] = "root"; $db_conf["password"] = "root"; $db_conf["database"] = "griddemo"; require_once("lib/inc/jqgrid_dist.php"); $g = new jqgrid($db_conf); $grid = array(); // set table for CRUD operations $grid["caption"] = "Test CI GRID"; $grid["rowNum"] = 10;//10,15 -- tinggi grid $grid["shrinkToFit"] = true; $grid["autowidth"] = true; $grid["hidegrid"] = true; //$grid["width"] = true; $grid["height"] = 450; #$grid["sortorder"] = "desc"; $grid["toolbar"] = "top"; $grid["add_options"] = array("recreateForm" => true, "closeAfterEdit"=>true, 'width'=>'750', 'top'=>'150', 'left'=>'200'); $grid["edit_options"] = array("recreateForm" => true, "closeAfterEdit"=>true, 'width'=>'750', 'top'=>'150', 'left'=>'200'); $grid["view_options"] = array("recreateForm" => true, "closeAfterEdit"=>true, 'width'=>'750', 'top'=>'150', 'left'=>'200'); $g->set_options($grid); $g->set_actions(array( "add"=>true, // allow/disallow add "edit"=>true, // allow/disallow edit "view"=>true, // allow/disallow edit "delete"=>true, // allow/disallow delete "rowactions"=>true, // show/hide row wise edit/del/save option "export_excel"=>true, // show/hide export to excel option "export_pdf"=>true, "autofilter" => false, // show/hide autofilter for search - advance, false,true "search" => false, // show single/multi field search condition (e.g. simple or advance) "inlineedit" => true ) ); // render grid $g->select_command = "select * FROM country"; $g->table = "country"; $g->set_columns($cols); $data['grid'] = $g->render("list1"); //$this->load->view('grilla',$data); $this->load->view('default/views/show_grid',$data); // For circle 404 page } } Thank you! Thu, 18 Jan 2018 10:51:09 +0000 Inline editing long text Dear Mr. Abu, I am in difficult to edit in inline mode a long text. I don't see the part of text that exceed a fixed width column. I try with .ui-jqgrid tr.jqgrow td { vertical-align: top; white-space: normal !important; padding:2px 5px; } but not solve the problem. Best regards. Nicola DE TOMASI Tue, 16 Jan 2018 10:16:38 +0000 Allow null for drop down values When a drop down value is not required but is queried from another do I allow no selection? See my code below. The PuArr2 ALLOWS the user to leave "unassigned" but the second one automatically inserts the first record in the lookup. $col = array(); $col["title"] = "Stop2"; $col["name"] = "stop2"; $col["dbname"] = "locationTbl2.code"; // this is required as we need to search in name field, not id $col["width"] = "18"; $col["align"] = "center"; $col["search"] = true; $col["editable"] = true; $col["edittype"] = "select"; // render as select # fetch data from database, with alias k for key, v for value $str = $g->get_dropdown_values("select distinct id as k, code as v from locationTbl where active = 1 order by v"); $col["editoptions"] = array("value"=>$str); $col["show"] = array("view"=>true, "add"=>true, "edit"=>true, "list"=>false); $col["isnull"] = true; $col["editrules"] = array("required"=>false); $cols[] = $col; $col = array(); $col["title"] = "PuAr2"; $col["name"] = "pu_arrival_reason2"; $col["align"] = "center"; $col["width"] = "19"; $col["editable"] = true; // this column is editable $col["edittype"] = "select"; $col["editoptions"] = array("value"=>'A1:A1--Missed Delivery;A2:A2--Incorrect Address;'); $col["editrules"] = array("required"=>false); // and is required $col["show"] = array("view"=>true, "add"=>true, "edit"=>true, "list"=>false); $col["isnull"] = true; $cols[] = $col; Tue, 16 Jan 2018 10:18:16 +0000 Using intro.js Hello, Is it possible to use an external Library like intro.js to show user how to use the grid? Thanks, Cedric Tue, 16 Jan 2018 13:58:28 +0000 Can I use Events on Laravel5.5? I can't use Events on Laravel5.5. source $e["on_insert"] = array("add_kamoku", null, FALSE); $g->set_events($e); error messeage. call_user_func() expects parameter 1 to be a valid callback, function 'add_kamoku' not found or invalid function name /Users/hirohito/Laravel5/ringi/app/Classes/phpgrid/jqgrid_dist.php#2167 Sun, 14 Jan 2018 04:04:34 +0000 Grind in bootstrap modal :( hi, abu I tried to put the grid in a modal bootstrap window - unfortunately it "sticks out" from such a window :( What to do ?? :) Regards Sat, 13 Jan 2018 04:21:54 +0000 Multiples Cols with diferent ID hi, in my grid I have some related tables, so I was asking if you could put different ids to each column.Because i need to create a Hiperlink for any column. Thanks and sorry for my English Sat, 13 Jan 2018 04:21:12 +0000 How to reduce the font in detail grid ? Hellou Abu! How to reduce the font in detail grid Without changing it in the main grid. Substitution styles work on both :/ Regards Torin Sat, 13 Jan 2018 03:55:16 +0000 Add/Edit form gets closed when the user clics out of form Hello When using the add/Edit form dialogue box to add/edit a record, the dialogue box gets closed/disappears when ever i click on out side of the dialogue box with in the browser window. How do I make it stay till the user clics cancel/submit button? Thanks Sat, 13 Jan 2018 04:26:13 +0000 Integrate with codeigniter Hello, I'm trying to integrate with codeigniter so: Controller: loggedIn) { $this->session->set_userdata('requested_page', $this->uri->uri_string()); $this->sma->md('login'); } if (!$this->Owner && !$this->Admin) { $this->session->set_flashdata('warning', lang('access_denied')); redirect($_SERVER["HTTP_REFERER"]); } } public function index() { // $this->load->view('welcome_message'); require_once(APPPATH. 'libraries/phpgrid/config.php'); // APPPATH is path to application folder // Database config file to be passed in phpgrid constructor $db_conf = array( "type" => PHPGRID_DBTYPE, "server" => PHPGRID_DBHOST, "user" => PHPGRID_DBUSER, "password" => PHPGRID_DBPASS, "database" => PHPGRID_DBNAME ); $g = new jqgrid($db_conf); $grid["caption"] = "Sample Grid"; $g->set_options($grid); $g->table = "clients"; $out = $g->render("list1"); $this->load->view('show_grid',$out); } ?> View: <!DOCTYPE html> Show Grid Welcome to CodeIgniter! Show me the grid! I have used tutorial to try to integrate it: But not works; Thanks by your help! Sat, 13 Jan 2018 04:26:08 +0000 Reload Grid button not reset select2 and/or daterange from inline search inputs Hi everyone, When I pressed the "Reload Grid" button, all inline search entries were reset except to those of type "daterange" and "select2"... The button (Reload Grid) work properly because reload all records without filtering, but I need also to reset all search inputs. How do I do this for "daterange" and "select2" search inputs? Thanks, Adrian Sat, 13 Jan 2018 06:51:39 +0000 Send email on inline edit update Hello, I have a grid with a field type select that can be update. I would like to send an email when the value of this field is updated. Could you help me achieve this? Thanks Jon Mon, 08 Jan 2018 05:29:21 +0000 Dropdown, until Village problem Dear Mr Abu, I want to create grid with Dropdown Dependent from country -> state -> City -> Village. The proble is, when the form load with Village data, the form like hang because the village more than 6.000 data. Would you like to solve my problem? Regards, Samsun Mon, 08 Jan 2018 14:36:14 +0000 Z-index and height of grid I am using a simple CSS drop down menu. I have set the z-index to 9999 but the grid always displays "over" my drop down menu? Anyone have any ideas? See here for screenshot with grid minimized. Thu, 28 Dec 2017 19:09:36 +0000 afterInsertRow seting default value Hi Abu, I want to click add on the grid in inline mode. New add row is added and I found the function afterInsertRow where I can do something. But I dont have any idea how I can set default values on it depending on other columns. for Example (after click on add): 3 Columns (1st Dropdown, 2nd Date, 3rd Text) So if I press add I want to set default value on 3rd Column depending on selected entry on 1st Dropdown value) So when I choose value 1 of Dropdown (1st column) I want to change value of the textbox (3rd column). Is there any possibility to do so? thx a lot, Gerhard Sun, 31 Dec 2017 20:15:29 +0000 Search form not reloading/requerying properly with filters When I use a search form even with $grid["persistsearch"] = true; I get weird errors when using the autofilter. It is like it loses that search form parameters. For example, 1. I set a date range: --Notice I have 1909 records. 2. I filter for a specific Truck. --Notice I know have 3,571 records? The same thing happens with all other filter/search fields also. Any thoughts? Dave Here are my grid options: $grid["sortname"] = 'id'; // by default sort grid by this field //$grid["cellEdit"] = true; $grid["sortorder"] = "desc"; // ASC or DESC $grid["caption"] = "Paperwork Check"; // caption of grid $grid["autowidth"] = true; // expand grid to screen width $grid["multiselect"] = false; // allow you to multi-select through checkboxes $grid["rowNum"] = 30; $grid["pgbuttons"] = true; $grid["viewrecords"] = true; $grid["rowList"] = array(); $grid["export"] = array("format"=>"excel", "filename"=>"TimeTable", "sheetname"=>"TripTimes"); $grid["form"]["position"] = "center"; $grid["edit_options"] = array('width'=>'500',"height"=>'500'); $grid["height"] = "690"; $grid["persistsearch"] = true; $g->set_options($grid); Thu, 28 Dec 2017 19:09:49 +0000 Data Form I am looking to use phpgrid for my grid. I need to be able to edit/add data. I know there is a dialog for editing/adding, but is that powerful enough? If not have others here used other forms tools, like data form, or data forms? Just trying to understand the best way to be able to edit/add data. I am not a php or html expert, but if someone knows of a good tool, I would like to take a look at it. Sun, 24 Dec 2017 22:46:11 +0000 Trigger automatically row update each x time Hello, I have a grid with two columns: DEPARTURE - TIME_CONSUMED Then i would like after insert row, to update time_consumed column based in real time. It's possible using trigger? Thank you! Fri, 22 Dec 2017 19:02:36 +0000 Out results to dashbaord Hi Abu, I have a query as such that I want to display in different parts of the page and not in the grid, is this possible: SELECT Count( AS Leads, Sum(L.Cost) AS `Lead Cost`, Sum(L.broker_fee) AS `Broker Fees`, Sum(L.legal_fees) AS `Other Fees`, Sum(L.comms) AS Commissions FROM tbl_lead L INNER JOIN tbl_clients C ON L.client_id = C.client_id WHERE Year(L.LeadDate) = 2017 For example I could take the value of 'Leads', 'Lead Cost' etc and output into different divs withion the page the page? Sat, 13 Jan 2018 04:28:10 +0000 Operators MAX value Hi is it possible to format a row cell & column cell on Max values? For example read through a row/column and hi-lite the highest value? I note the operators as eq', 'ne', 'lt', 'le', 'gt', 'ge', 'bw', 'bn', 'ew', 'en', 'cn', 'nc', 'nu', 'nn', 'in', 'ni' but cant see one for max value Mon, 11 Dec 2017 16:39:57 +0000 filter date field for null values how do I advanced filter date field for null values Currently the value field shows a date picker by default Tue, 05 Dec 2017 16:07:35 +0000 Does it work in the free version Footer Summary?? Hi everyone I'm just starting my adventure with phpgrid and I came to Footer Summary which completely does not work: / I wrote: $ opt ["footerrow"] = true; And there was an empty footer in the grid. Later: $e["js_on_load_complete"] = "grid_onload"; $g->set_events($e); $e["js_on_load_complete"] = "grid_onload"; $g->set_events($e); function grid_onload() { grid.jqGrid('footerData','set', {id: 'Test'}); } and nothing works anymore :( 500 Internal Server Error What am I doing wrong, or maybe it will not work in the free version? Regards Torin sorry for my English... Tue, 05 Dec 2017 15:58:57 +0000 error-Please select rows to edit Hello im triyin to use bulk edit to execute a query with the selected rows, however when the functions is called, evethough i selected a row i received a error message indicating that i must select a rowt to edit. could you give me a hint where to llok at, to solve it? Tue, 19 Dec 2017 21:19:11 +0000 Hidden Dropdown while select first Hello, There is option to use dropdown with three select elements, but start hidden last two while select first. Something as example below: But replacing label by dropdown element. this is basically for speed in application! Best regards... Tue, 05 Dec 2017 02:49:07 +0000 Export to CSV is blank Hey all, We have a very basic web report built using PHPGrid and when trying to export the results to CSV, the file is 0B and has no data. W're using PHP v5.4 on Server 2010/IIS; It was 4GB RAM. I thought it might be a memory limit issue...I increased the memory_limit option in php.ini to 128MB but still same issue ( The entire result set if exported is ~20MB). Also added 2GB pagefile but still same issue. If i filter the report in the browser to >3000 records, i can export, but any more than that and it's blank. No error messages or anything and the perfomance monitor doesn't show that memory usage goes above 30% at any point. Tue, 28 Nov 2017 13:53:48 +0000 problem in serach option Hi abu I store value in database Y,N But in grid i Display Like Yes,No Problem is : When I search Yes It Shows Empty Row How i Rectify This problem Fri, 24 Nov 2017 15:13:02 +0000 Unserialize data Hello, I have a table where one field as the data serialized with php. Is it possible to unserialized the data before displaying it? Thanks, Cedric Tue, 21 Nov 2017 16:26:58 +0000 No such method: groupingCalculations.handler I use a persist-settings on reports and am now trying to add a Group Summary field. Grouping works fine, but when I add the Summary Type: $col["summaryType"] = "sum"; I get an error reported: jqGrid.state.js:379 - Uncaught jqGrid - No such method: groupingCalculations.handler Do I need to download/buy a new update? It looks to be by design of the jqGrid.state.js where-by it's halting the script and throwing an error if it can't find the object it's trying to save the state-of. In my case - I would never need to save the state of the grouping list - but I can't find a way around this. Any suggestions? I can remove the persist settings section and jqgrid.state.js but then the report is not as useful (with persist settings). Thanks for any assistance. Mike Fri, 24 Nov 2017 18:07:06 +0000 phpgrid and Codeigniter problem Hi, I'm using phpgrid and codeigniter like and have a problem. Codeigniter run fine but images not show (nex, back, add, delete, edit...). You can view here: Thanks. Sun, 19 Nov 2017 19:02:24 +0000 Problem with add dialog box with 2 date fields ONLY IF the date is the first field in the dialog box This code works perfectly (date field not in first position): $g = new jqgrid($db_conf); $g->table = "test"; $opt = array(); $opt["caption"] = "Test"; $g->set_options($opt); $cols = array(); $col = array(); $col["title"] = "ID"; $col["name"] = "ID_test"; $cols[] = $col; $col = array(); $col["title"] = "Text"; $col["name"] = "Text"; $col["editable"] = true; $cols[] = $col; $col = array(); $col["title"] = "Data1"; $col["name"] = "Data1"; $col["editable"] = true; $col["formatter"] = "date"; $col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d/m/Y'); $cols[] = $col; $col = array(); $col["title"] = "Data2"; $col["name"] = "Data2"; $col["editable"] = true; $col["formatter"] = "date"; $col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d/m/Y'); $cols[] = $col; $g->set_columns($cols); $out_grid_1 = $g->render("list1_1"); and this not (date field in first position): // grid_1 (Test) $g = new jqgrid($db_conf); $g->table = "test"; $opt = array(); $opt["caption"] = "Test"; $g->set_options($opt); $cols = array(); $col = array(); $col["title"] = "ID"; $col["name"] = "ID_test"; $cols[] = $col; $col = array(); $col["title"] = "Data1"; $col["name"] = "Data1"; $col["editable"] = true; $col["formatter"] = "date"; $col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d/m/Y'); $cols[] = $col; $col = array(); $col["title"] = "Text"; $col["name"] = "Text"; $col["editable"] = true; $cols[] = $col; $col = array(); $col["title"] = "Data2"; $col["name"] = "Data2"; $col["editable"] = true; $col["formatter"] = "date"; $col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d/m/Y'); $cols[] = $col; $g->set_columns($cols); $out_grid_1 = $g->render("list1_1"); Fri, 17 Nov 2017 17:39:10 +0000 Records are listed twice When I enter search criteria, the records are listed twice. Get all the right records once, and then they are repeated. The strange thing is that this doesn't happen every time. Any suggestion? Fri, 17 Nov 2017 12:44:25 +0000 sum colums How can I insert the value of a+b into c? $col = array(); $col["title"] = "LOG"; // caption of column $col["name"] = "a"; // grid column name, must be exactly same as returned column-name from sql (tablefield or field-alias) $col["width"] = "200"; $col["align"] = "center"; $col["editable"] = FALSE; $col["hidden"] = False; $col["search"] = true; $cols[] = $col; $col = array(); $col["title"] = "LOG"; // caption of column $col["name"] = "b"; // grid column name, must be exactly same as returned column-name from sql (tablefield or field-alias) $col["width"] = "200"; $col["align"] = "center"; $col["editable"] = FALSE; $col["hidden"] = False; $col["search"] = true; $cols[] = $col; $col = array(); $col["title"] = "LOG"; // caption of column $col["name"] = "c"; // grid column name, must be exactly same as returned column-name from sql (tablefield or field-alias) $col["width"] = "200"; $col["align"] = "center"; $col["editable"] = FALSE; $col["hidden"] = False; $col["search"] = true; $cols[] = $col; Tue, 14 Nov 2017 03:17:32 +0000 Library PhpGrid How PhpGrid can called from library codeigniter, for example in controller $this->load->library('phpgrid'); ? Thu, 09 Nov 2017 16:18:03 +0000 Library in codeigniter (phpgrid) How make library in codeigniter for Phpgrid ? Mon, 08 Jan 2018 04:18:02 +0000 Multiple Select dropdown issue Hi Abu, I'm trying to implement a field which allows multiple values to be selected. The below code using Select2 allows me to add a new record and select multiples as well as edit an existing record with a single value in it. However when I edit a record with multiple values already in the field it doesn't bring up those values, it just puts a blank in the field. I checked in the backend table and the comma separated list of values is saved in the table so the data is there, it's just how do I get it to pull through as separate values when loading the field with Select2? $col = array(); $col["title"] = "Asset"; // caption of column $col["name"] = "AssetID"; // field name, must be exactly same as with SQL prefix or db field $col["width"] = "70"; $col["fixed"] = true; $col["align"] = "center"; $col["editable"] = true; $str = $g->get_dropdown_values("select DISTINCT AssetNumber as k, AssetNumber as v from mexassets ORDER BY AssetNumber"); $str = ':;' . $str; $col["stype"] = "select"; $col["edittype"] = "select"; $col["searchoptions"] = array("value" => $str, "separator" => ":", "delimiter" => ";"); $col["editoptions"] = array("value" => $str, "separator" => ":", "delimiter" => ";"); $col["editoptions"]["multiple"] = "true"; $col["editoptions"]["dataInit"] = "function(){ setTimeout(function(){ $('select[name=AssetID]').select2({width:'80%', dropdownCssClass: 'ui-widget ui-jqdialog'}); },200); }"; $cols[] = $col; Tue, 14 Nov 2017 03:11:53 +0000 Error Exporting dates to excel Hi. I'm exporting to excel my grid. I have a column with date formatting. In my database i have dates like this: 0000-00-00. in the screen no display in that columns. thats ok.. but if i export to excel, i'm getting this date: "-0001-11-30" in the 0000-00-00 fields.. how can i do to make empty cells when a date 0000-00-00 was found? Wed, 08 Nov 2017 16:56:53 +0000 Inline add, four movement keys and auto save Hello, Will be possible to implement inline add moving with the four scroll arrows in the keyboard, so when move auto save data entered. Thank you! Thu, 16 Nov 2017 22:31:12 +0000 Jqgrid - Column menu with actions Hi, Does it support jqgrids column menu with actions? The person can choose to hide/show columns, filter, and group individual columns. Mon, 06 Nov 2017 15:34:34 +0000 Your Js virus trigger a linux virus scan The files jquery.jqGrid.min.js jquery.jqGrid2.min.js show as a virus when using Linux Malware Detect v1.6.2 just so you know what is the current verison of phpgrid, i may need to upgrade thanks Thu, 02 Nov 2017 19:11:46 +0000 Export Export function is not working in Firefox 56.0.2 64 bit. Please give some solutions Thu, 02 Nov 2017 05:35:57 +0000 Autocomplete Hello. In the sql on formatoptions, can I use the where clause? $col["formatter"] = "autocomplete"; // autocomplete $col["formatoptions"] = array("sql"=>"SELECT codProfesional AS k, nombre AS v FROM gen_profesional ORDER BY nombre", "search_on"=>"matricula", "update_field"=>"codProfesional"); Wed, 01 Nov 2017 21:20:47 +0000 Country/State/City - No onload countrywise selection of state Dear Abu, if you edit a record in the demo all states appear in the state dropdown although Pakistan is selected as country. If you change the country and then change back everything is ok. Is there a chance to filter "onload"? THX in advance :-) Regards, K. Mon, 30 Oct 2017 18:03:09 +0000 search Hello! It looks like some problems exist for search. When I using search function (typing keywords in the field) this error occuers: "undefined searchField in php_dist, next row:" $fld = $this->escape_string($_REQUEST['searchField']); var_dump($_REQUEST); array(8) { ["grid_id"]=> string(5) "list2" ["_search"]=> string(4) "true" ["nd"]=> string(13) "1506591962755" ["rows"]=> string(2) "20" ["jqgrid_page"]=> string(1) "1" ["sidx"]=> string(8) "id_image" ["sord"]=> string(4) "desc" ["filters"]=> string(123) "{"groupOp":"AND", "rules":[ {"field":"IMG_FILE", "op":"cn", "data":"00114"}, {"field":"HEADER_TEXT_DOC", "op":"cn", "data":"Abu"} ] }" } script works when changing code to: //$fld = $this->escape_string($_REQUEST['searchField']); $past = json_decode ($_REQUEST['filters'],true); $fld = $past['rules'][0]['field']; + //$fldata = $this->escape_string($_REQUEST['searchString']); //undefined searchString $fldata = $past['rules'][0]['data']; + // $foper = $this->strip($_REQUEST['searchOper']); // undefined searchOper $foper = $past['rules'][0]['op']; Mon, 30 Oct 2017 18:11:27 +0000 Multiple File Icons Hi Abu, Love the product and I just wanted to share some code. I had previously implemented displaying icons in the grid for uploaded files which worked well. I have now enabled the multiple file upload option and wanted to maintain the icon display feature, only this time display 1 icon per uploaded file. Here's the solution I came up with adding another array to your original solution: function display_icon($data) { $filelist = $data["attachment"]; $filearray = explode(",",$filelist); $filecount = count($filearray); $result = ""; for($x=0; $x ; } return $result; } Mon, 30 Oct 2017 18:08:10 +0000 Inline edit certain columns there's a way in the inline edit to show a columns in a "readonly" way??? show but not edit in line? thanks Thu, 26 Oct 2017 07:50:12 +0000 non-database dropdown I have a dropdown (for regions) in an include member. It's an array. How can I get it to display the data in a dropdown? I have the 'member' included and it works in other programs that don't use this grid quite well. I'm also able to successfully use a database table for a 'select'. But how do I get the data from this "include" member into my dropdown. Here is what I've tried (stateList['US'] is in the included code): $col = array(); //$states_arr = arrayToSelect($stateList['US'], $remitToState); $col["title"] = "AP State"; // caption of column, can use HTML tags too $col["name"] = "remitToState"; // grid column name, same as db field or alias from sql $col["dbname"] = "remitToState"; $col["width"] = "35"; $col["search"] = true; $col["editable"] = true; $col["edittype"] = "select"; // render as select //$str = $g->get_dropdown_values(arrayToSelect($stateList['US'], $remitToState)); $str = $g->get_dropdown_values(array(arrayToSelect($stateList['US']))); //$col["editoptions"] = arrayToSelect($stateList['US'], $remitToState); //$col["editoptions"] = array($stateList['US']); $col["editoptions"] = array("value"=>":;".$str); //$col["formatter"] = "select"; // display label, not value //$col["stype"] = "select"; $cols[] = $col; Thu, 26 Oct 2017 04:11:08 +0000 master-detail-fancy inside subgrid Hi, It's possible to have a master-detail-fancy inside a subgrid? I have a master grid with: - subgrid (+) and also - I define a cols link with fancybox (like master-detail-fancy.php from demos): $col["default"] = "View Details"; and work perfectly.. I also use the same code (maser-detail-fancy) into subgrid (subgrid_detail.php) but $lid_d = $_GET["id"]; return the master grid id not subgrid id and into fancybox I get wrong results ($grids_d->select_command = "SELECT * FROM cnpp_log WHERE idtabela = $lid_d";) How send correct to second id Please help, Adrian Thu, 26 Oct 2017 07:58:04 +0000 Error while using Search Hi Error while using Search Couldn't execute query. Column 'id' in where clause is ambiguous - SELECT count(*) as c FROM (SELECT ,t.title, rr.s_no, rr.henkyakuyotei FROM tosho as t INNER JOIN (SELECT,s_no,henkyakuyotei,r.status FROM rent as r WHERE r.status ='2') AS rr WHERE t.status = '2' AND ( `id` LIKE '%2%' )) pg_tmp SQL is follow.This can run in phpMyAdmin . SELECT ,t.title, rr.s_no, rr.henkyakuyotei FROM tosho as t INNER JOIN (SELECT,s_no,henkyakuyotei,r.status FROM rent as r WHERE r.status ='2') AS rr WHERE t.status = '2' Mon, 23 Oct 2017 17:05:48 +0000 Installation keep installing Demo not my DB Hello, Just purchased the full copy. I followed the instructions by renaming and modifying config.php with my hosted MySQL database. After running "install.php" I am taken to the demo site instead of my own database. Can you please provide clear instructions on how to prevent the demo and get to my own database defined in the config.php? Thank you, Sun, 22 Oct 2017 05:24:14 +0000 jquery is not working on phpgrid why?? i complete read the documentation and install adminlte with laravel integration but one error is phpgrid is not calls jquery what happend with it i dnt knw please rply me fast. Thu, 18 Jan 2018 11:01:54 +0000 Send email on_delete Is there a way I cand send an email when I delete a record from db? I mean I want to show what was erased, actually I can send the email but empty $e["on_after_insert"] = array("manda_correo", null, true); $e["on_delete"] = array("correo_borrado", null, true); $g->set_events($e); "some part of the emaail" {$data["params"]["id_supervisor"]} btw when I insert a record the email shows the values inserted Fri, 20 Oct 2017 18:01:18 +0000 Multi virtual/math column Hi, it is possible to create more than one virtual/math column? I'm trying to do that, only the last one appears. $col = array(); $col["title"] = "col1v"; $col["name"] = "col1-virtual"; $col["width"] = "40"; $col["editable"] = false; $col["hidden"] = false; $col["on_data_display"] = array("do_mathmm",""); $cols[] = $col; $col = array(); $col["title"] = "col2v"; $col["name"] = "col2-virtual"; $col["width"] = "40"; $col["editable"] = false; $col["hidden"] = false; $col["on_data_display"] = array("do_mathss",""); $cols[] = $col; function do_mathss($data){ return $data["wholesale_price"] * $data["diff_order_ps"] * 2; } function do_mathmm($data){ return $data["wholesale_price"] * $data["diff_order_ps"] * 1; } Thu, 09 Nov 2017 20:47:55 +0000 Data crossing between table and imported file Hello Abu, There is a way to implement module for Data crossing to compare Cols data as when you´re searching yo select All or Any then compare symbol as (Contains, equal, etc). So I compare it with the other Col from uploaded file. This is to implement with module Export - Import 2, this is to compare to the flight between data col into file imported and data col into table. Thank you, regards! Mon, 23 Oct 2017 17:10:07 +0000 Bulk Edit custom behavior I followed the code in the bulk-edit example. It seems to me that if you use that, then it does what is in the update_data function and does not do its normal bulk edit functionality. I would like it to first do the normal bulk edit functionality and then do some extra code, is there a setting for that? Fri, 20 Oct 2017 11:06:47 +0000 Excel-Export don't work correct in version 2.2 Hallo Abu, my Excelexport works not correct. After download the file i can't open the excel-sheet. I got a filename "my-file.xlsx.xls" and i can't open it with excel. Please check your demo "" the results there are the same. Gerd PS: Please have a look to your homepage there is no menu !!! Fri, 20 Oct 2017 04:16:04 +0000 integration with codeigneiter Best regard, I need your help by integrating phpdatagrid into codeigneiter. It's possible? Thank you very much Fri, 20 Oct 2017 18:01:24 +0000 drop down select Hi sir, Required message is not shown for the Drop down fields. How to define the message . Tue, 16 Jan 2018 08:52:36 +0000 How do I get Data before updating I am trying the code below. When I add the line: $datab4=$data; it prevents saving the update-probably a code error in do_onselect? function do_onselect(id) { var rd = jQuery('#list1').jqGrid('getCell', id, 'company'); // where invdate is column name jQuery("#span_extra").html(rd); $datab4=$data; } then (to log only fields changed): function update_log($data) { global $g,$THISTABLE,$resultbefore,$datab4; foreach($data[params] as $k=>$d) { //global $StringID; //global $user; //$achgs2=$achgs2."(`action`,`attribute_name`,`new_value`, `updated_by`) VALUES ('Update', '$k','$d', '$user')"; $db4=$data["params"]["$k"]; if ($db4<>$d and $k<>"LastUpdated" and $k<>"seqnum") { $achgs2=$achgs2."[$k][$db4[$i]] to [$d]"; } $i++; } Sun, 01 Oct 2017 19:25:54 +0000 How can I set up the hover effect on rows How can I set up the hover effect on rows? Sat, 30 Sep 2017 01:34:48 +0000 Export csv, xls with template Dear Mr Abu, Is PHP Grid support export with file template? Regards, Samsun Sat, 30 Sep 2017 01:42:32 +0000 set_col_default I have not been able to get $g->set_col_default('jobdate', '2017-02-03'); to work and it's not even as complicated as I need it to be. What I need is THIS during an "ADD RECORD operation". $g->set_col_default('jobdate', insert todays date into the record); Every time I put this statement into the code and launch the page, I get a blank white screen. $g = new jqgrid($db_conf); $grid["caption"] = "JOBS"; $grid["toolbar"] = "bottom"; $grid["pgbuttons"] = false; $grid["pgtext"] = null; $grid["width"] = "1080"; $grid["sortable"] = true; $grid["sortname"] = "done"; $grid["rowNum"] = 999; // or any of your desired rec/page FINALLY! this works! $grid["rowList"] = array(); $g->set_options($grid); $g->table = "jobs"; $col = array(); $col["name"] = "jobid"; $col["title"] = "JobID"; $col["fixed"] = true; $col["width"] = "60"; $col["editable"] = false; $cols[] = $col; $col = array(); $col["name"] = "custid"; $col["title"] = "CustID"; $col["fixed"] = true; $col["width"] = "60"; $col["editable"] = false; $cols[] = $col; $col = array(); $col["name"] = "jobdate"; $col["title"] = "Date"; $col["fixed"] = true; $col["width"] = "94"; $col["formatter"] = "date"; $col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'m/d/Y'); $col["align"] = "right"; $cols[] = $col; $col = array(); $col["name"] = "year"; $col["title"] = "Year"; $col["fixed"] = true; $col["width"] = "60"; $col["align"] = "right"; $cols[] = $col; $col = array(); $col["name"] = "make"; $col["title"] = "Make"; $col["fixed"] = true; $col["width"] = "100"; $cols[] = $col; $col = array(); $col["name"] = "model"; $col["title"] = "Model"; $col["fixed"] = true; $col["width"] = "174"; $cols[] = $col; $col = array(); $col["name"] = "engine"; $col["title"] = "Engine"; $col["fixed"] = true; $col["width"] = "110"; $cols[] = $col; $col = array(); $col["name"] = "mileage"; $col["title"] = "Mileage"; $col["align"] = "right"; $col["fixed"] = true; $col["width"] = "80"; $cols[] = $col; $col = array(); $col["name"] = "license"; $col["title"] = "License"; $col["align"] = "right"; $col["fixed"] = true; $col["width"] = "90"; $cols[] = $col; $col = array(); $col["name"] = "done"; $col["title"] = "Done"; $col["search"] = false; $col["align"] = "center"; $col["fixed"] = true; $col["width"] = "60"; $cols[] = $col; $col = array(); $col["name"] = "memo"; $col["title"] = "Memo"; $col["fixed"] = true; $col["width"] = "90"; $col["sortable"] = false; $cols[] = $col; $col = array(); $col["name"] = "staxrate"; $col["hidden"] = true; $cols[] = $col; $col = array(); $col["name"] = "vin"; $col["hidden"] = true; $cols[] = $col; $col = array(); $col["title"] = "Action"; $col["name"] = "act"; $col["fixed"] = true; $col["width"] = "70"; $col["align"] = "center"; $cols[] = $col; $g->set_columns($cols,true); $outjobs = $g->render("list1"); //$g->set_col_default('jobdate', '2017-02-03'); // supposed to be used only for add record // End of JOBS grid definition Sat, 30 Sep 2017 01:36:56 +0000 Grouping Toggle / Untoggle All Hi Abu, I've got a grid with 2 nested layers of grouped items which is working fine: $grid["groupingView"]["groupField"] = array("name","coupon"); What I would like to do is have a "+" button either in the header or in the buttons at the bottom of the table that will collapse or expand all the grouped rows. I've searched in the forum and found the code for a similar thing for SubGrids however can't make it work for Groups. I can see the code that runs when clicked the +/- is: onclick="jQuery('#list1').jqGrid('groupingToggle','list1ghead_1_516');return false; I want to get all the 'list1ghead_#####' items and loop through them to collapse/expand. Ideally as well since it is nested is there a way to have a collapse/expand all option inside the nesting, i.e when I click the first "+" to show the sub grouped items there is an option inside there to only expand all those under the first layer of the nest? Thanks mate, Matt Fri, 20 Oct 2017 11:06:53 +0000 Hiding currency formatted values if null / empty Hi there, I currently have columns setup with the following format: $col["formatter"] = "currency"; $col["formatoptions"] = array("prefix" => "$", "suffix" => '', "thousandsSeparator" => ",", "decimalSeparator" => ".", "decimalPlaces" => 0); But if the value is empty or null, it shows on the grid as 0.00 How can I make it show these as empty instead? Thanks Sun, 24 Sep 2017 20:17:11 +0000 Multiselect filter doesn't work in search dialog box This can be viewed also in your demo (Integration > Multiselect filter). When I open the search dialog box and select Client, the multiselect filter appears in the background, but is non possible to check any checkbox. Thu, 02 Nov 2017 07:03:06 +0000 custom property for editoption function updateddet(data) { $("#agtcode").attr('required', true); } this is not working.How to make this to work.Help is need very urgently Sun, 24 Sep 2017 19:35:30 +0000 Disable header/footer-rwo Hello Mr Abu, is it possible to hide the header/footer-row with the options "Add new row, Edit selected row, ..."? I can't find it anywhere. Thanks a lot for your help. Sat, 30 Sep 2017 01:37:02 +0000 inliene edit Sir, How to make some fields to be non editable after calling some custom calculation functions. ie. function calculatekgfat() { var kgqty= (($("input[name=kgqty].editable").val()*$("input[name=fat].editable").val())/100); $("input[name=kgfat].editable").val(parseFloat(kgqty).toFixed(2)) ; $("#kgfat").attr("disabled", "disabled"); calculatekgts() ; } Fri, 22 Sep 2017 18:55:19 +0000 default value in colums Hi, how can i set a default value for a colum? I mean // --------------------------------------- NOMBRE $col = array(); $col["title"] = "NAME"; $col["name"] = "nombre"; $col["width"] = "15"; $col["editable"] = true; $col["align"] = "center"; $col["search"] = true; $cols[] = $col; I would like to set a default value for this colum when I open the add record option this colum should show the default value I want to set Fri, 22 Sep 2017 19:01:11 +0000