phpgrid.desk.com :: General Questions https://phpgrid.desk.com/customer/en/portal/topics/377958-general-questions General Questions articles 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. https://phpgrid.desk.com/customer/portal/questions/6970287-subgrid-expand-all 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 Tue, 26 Sep 2017 04:29:19 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17146052 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 https://phpgrid.desk.com/customer/en/portal/questions/17145062 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. Sun, 24 Sep 2017 19:41:07 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17144806 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 https://phpgrid.desk.com/customer/en/portal/questions/17144756 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. Mon, 25 Sep 2017 07:15:46 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17144121 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 https://phpgrid.desk.com/customer/en/portal/questions/17144044 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 https://phpgrid.desk.com/customer/en/portal/questions/17143653 Case Insensitive Search with Array as data source Hi Abu, I have a grid with an array set as the data source. When I try to use the inline search to filter the grid, it is Case Sensitive and I would like it to be case insensitive. I had set the column up as: $col["name"] = 'column_name'; $col["dbname"] = 'LOWER(column_name)'; This was to try to search the column in lower case, but it did not work. Could you please advise on how to get this inline search working Case Insensitive for a grid with an array as the data source? Thanks Fri, 22 Sep 2017 19:00:58 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17143578 function lower(numeric) not found on postgresql Hi Abu, I already bought the new library, and its working fine. except when I declare the following and try to search a numeric field, i am getting a postgresql error that $col = array(); $col["title"] = isset($lang['HIGH']) ? $lang['HIGH'] : 'High'; $col["name"] = "px_high"; $col["dbname"] = "h.px_high"; $col["width"] = "80"; $col["fixed"]=true; $col["sorttype"] = int; $col["editable"] = false; $col["align"] = "right"; $cols[] = $col; SELECT count(*) as c FROM (SELECT a.px_date as Date, ROUND(a.px_open,2) AS open, ROUND(a.px_high,2) AS high, ROUND(a.px_low,2) AS low, ROUND(a.px_close,2) AS close, ROUND(a.adj_px_close,2) AS adj_close, a.volume, a.ex_dividend as dividend, a.split_factor as split FROM historical_prices a WHERE a.figi = 'BBG000C2V3D6' AND ( LOWER(a.px_open) LIKE LOWER('%1%') )) pg_tmp this coming under postgresql query site ERROR: function lower(numeric) does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You might need to add explicit type casts. Character: 326 Can you help? Thanks Tue, 19 Sep 2017 15:02:16 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17142020 Bootstrap 4 including Hallo, i want to ask for the plans in near future to include bootsap 4 in phpgrid. Regards Gerd Thu, 21 Sep 2017 10:10:23 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17141142 Uncheck row of recently added record. Hi, Is there a way to unhighlight and uncheck a row after it has been saved/updated? Thanks - Greg Tue, 19 Sep 2017 23:18:25 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17140780 custom-grid-button Hi Abu, i try set a custom button, having this: here there's no problem, this invoke the funcionality of the edit button of the toolbar. But if i have a custom button in the toolbar and i want to do the same with that... first add in js the button: jQuery(document).ready(function(){ jQuery('#list1').jqGrid('navButtonAdd', '#list1_pager', {'caption' : 'Generar Pago', 'buttonicon' : 'ui-icon-extlink', 'onClickButton': function() { var selectedRows = jQuery('#list1').jqGrid('getGridParam','selarrrow'); window.open("facturar.php?id="+selectedRows,'_self') }, 'position': 'last' }); The question is: how to do for invoke the behavor in my custom button like the edit button of the toolbar??? what value set instead of #edit_list1??? i try this without luck... thanks... Fri, 15 Sep 2017 17:20:59 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17140243 aucomplete contry, like Dropdown Dear Mr Abu, Would you like to gime example Autocomplete to Select Coontry->State->City like example Dropdown Country? Regards, Samsun Fri, 15 Sep 2017 11:34:45 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17140000 Date Range Picker work with autofilter but not with search options Hi Abu, I use "daterange" for search. This is my code: $col["isnull"] = true; $col["width"] = "120"; $col["formatter"] = "date"; $col["stype"] = "daterange"; $col["formatoptions"] = array("srcformat"=>'Y-m-d',"newformat"=>'d.m.Y', "opts" => array("showOn"=>"none")); $col["align"] = "center"; $col["editrules"] = array("custom"=>true,"custom_func"=>"function(val,label){return dataValidate(val,label);}"); Work perfectly in autofilter (the result is correct), but same filter in advance search (same in simple search) does not filter at all. Please help! Thanks! Adrian Wed, 13 Sep 2017 23:06:42 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17138708 select_statement I have conditional select statements. One returns columns a, b, and c. Another returns columns c, d, e, and f. The query is dependent on a master grid selection. The selection action happens with no errors but the grid does not change. Do I need to refresh the grid so that it picks up the query change? Thanks in advance. Wed, 13 Sep 2017 20:16:13 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17138169 Master-detail Hello, i want to set a dropdown control which has the same type dependency of the grid's source this is the detail: $id = intval($_GET["rowid"]); $g->select_command ="SELECT * FROM pagos WHERE idemp = $id"; $g->table = "pagos"; $col = array(); $col["title"] = "Id"; $col["name"] = "idpag"; $col["fixed"] = true; $col["width"] = "33"; $col["align"] = "center"; $col["show"] = array("list"=>false,"edit"=>false,"add"=>false,"view"=>false); $cols[] = $col; $col = array(); $col["title"] = "Alumno"; $col["name"] = "idalu"; $col["fixed"] = true; $col["width"] = "44"; $col["align"] = "center"; $str2 = $g->get_dropdown_values("select distinct id as k, name as v from alumns where idemp = $id"); the dependency of this last line no works.... any ideas???? Tue, 12 Sep 2017 02:03:56 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17136243 Master-detail Hello, i want to set a dropdown control which has the same type dependency of the grid's source this is the detail: $id = intval($_GET["rowid"]); $g->select_command ="SELECT * FROM pagos WHERE idemp = $id"; $g->table = "pagos"; $col = array(); $col["title"] = "Id"; $col["name"] = "idpag"; $col["fixed"] = true; $col["width"] = "33"; $col["align"] = "center"; $col["show"] = array("list"=>false,"edit"=>false,"add"=>false,"view"=>false); $cols[] = $col; $col = array(); $col["title"] = "Alumno"; $col["name"] = "idalu"; $col["fixed"] = true; $col["width"] = "44"; $col["align"] = "center"; $str2 = $g->get_dropdown_values("select distinct id as k, name as v from alumns where idemp = $id"); the dependency of this last line no works.... any ideas???? Tue, 12 Sep 2017 02:02:42 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17136219 Preserve grid view when updating Hi. Is there a way to keep track of changes in a grid? That is, when hiding columns or moving the width of the same remain the same as updating the page. Fri, 08 Sep 2017 13:07:03 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17135616 Autofill field I want to autofill a colum but i cant i dunno what´s wrong $col = array(); $col["title"] = "direccion"; $col["name"] = "direccion"; $col["width"] = "4"; $col["editable"] = true; $col["align"] = "center"; $col["search"] = true; $col["formatoptions"] = array( "sql"=>"SELECT direccion as k, nombre as v FROM supervisores","update_field"=>"direccion"); $col["formatoptions"] = array( "sql"=>"SELECT *, nombre as v FROM supervisores", "search_on"=>"concat(nombre,'-',id)", "callback"=>"fill_form"); function fill_form(data) { jQuery("input[nombre=direccion].FormElement").val(data.direccion); jQuery("input[nombre=direccion].editable").val(data.direccion); } When i do the insert (nombre) on grid i want to autofill the direccion field Thu, 07 Sep 2017 18:16:45 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17135211 POSTGRES Free Version 2.0 for test Hi, Do you support POSTGRES on free version 2.0, Latest download available ? Actually i get this message : You must have PostgreSQL installed for this demo. Also set database crendentials in this demo. Click on Code tab for source. I update, the credentials, but always the same problem ! Tue, 19 Sep 2017 23:16:43 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17135106 Loading Image Hi, Refer to https://gist.github.com/gridphp/915d2e0834354913fdfd338d47d50a53 Loader is not showing when i just click on the submit, loader.gif shows when it come to complete. Any suggestion? Thu, 07 Sep 2017 18:14:29 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17134159 Limit a (inline) input to 4 digits Hi Abu I have 2 Questions 1. I have a 4-digits code coloumn in my record, and I want to limit the input to exactely 4 digits, when adding a new record. I don't see a specific limit command, how can i now peform this check ? 2. Is the serverside validation only avaiable in the popup mode ? I'd like to avoid the popup mode and prefer the inline add method. Thanks for any help Mon, 04 Sep 2017 20:59:14 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17132596 Aliased columns on JOIN This software seems to have a hell of a hard time dealing with aliased columns on a JOIN. I can't get them to show on the grid about half the time, even though my code between php programs is very similar -- just the query part is different. Example: $g->select_command = "SELECT prim_key, a.file_name , a.sign_date, CONCAT(b.firstname, ' ', b.lastname) AS person FROM vdocs a JOIN vmems b ON b.groupId = a.vendor_id AND b.member_id = a.vdoc_mem_id " The field "person" will not show up in the grid, even though it looks like pretty simple code to display it. And yeah, it DOES show up in my phpmyadmin when I do a query. The grid 'definition' is this: $col = array(); $col["title"] = "Signed By"; $col["name"] = "person"; // grid column name, same as db field or alias $col["width"] = "40"; $col["editable"] = false; $col["search"] = false; $cols[] = $col; It doesn't work when I prefix the field with the table name, when I use it as "b.person", when I use it as "person" AND it doesn't even work if I just select 'lastname' and use that in '$col["name"]'. It doesn't show up in the JSON Response, so yeah I see that. But I don't care -- I'm not the one who wrote the JSON; I'm just trying to save time writing reports and I seem to be wasting it instead of saving it. So what's the deal here? I've had the same issues with almost EVERY OTHER alias I've used with phpgrid. I've poured over the forums and the documentation and nothing I see answers this. Tue, 12 Sep 2017 02:01:51 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17130981 conditional edit/delete by row We have an older version and are looking to have a conditional edit/delete by row. It looks like the newer versions can do this as shown in demos/editing/column-access.php The version I have does not include this example file. Is a conditional edit/delete by row avaivable in version 1.4.8.3? Tue, 29 Aug 2017 20:35:57 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17129380 Add second grill Hi Abu. I would like to know if you can add, edit or delete records of the second grid, depending on the value of the field of the first grid. Example: If the state of the first grid is "O" open, I can add, modify, and unsubscribe. If the state of the first grid is "C" closed, I can not make any changes in the second grid. Thank you Wed, 30 Aug 2017 01:24:23 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17129157 MS SQL DB special characters umlauts Hi, we have a problem to save special characters (german umlauts) in our database by the Grid. Grid: äüö@€ DB: äüö@€ Could you help me please ? Thanks Best regards. Markus Mon, 28 Aug 2017 19:14:33 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17128446 Hiding Blank Columns Per https://phpgrid.desk.com/customer/portal/questions/14415489-hidding-empty-columns what is the syntax to 1. check for blank columns and 2. hide those columns. Mon, 28 Aug 2017 19:08:21 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17127026 New daterangepicker example code Licensed user, V2.2 code. The demo video ( http://www.phpgrid.org/date-range-picker-supported/ ) on the new support for the daterangepicker is exactly what I'm looking for in my grid. Where can I find example code to make it work exactly like the video? Thanks! Thu, 24 Aug 2017 19:28:14 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17126675 Exporting just currently visible columns Is there a way to restrict exported data just to the columns that the user made visible? I know that there is a possibility to always prevent a column from being exported ($col["export"]=false;) and there's a demo (export-selected.php) that, judging by the grid's header ("Export Selected Rows/Columns"), is supposed to do just what I'm looking for - but unfortunately the demo only honors selection of rows, and always exports all columns (regardless of which are selected/visible.) Mon, 28 Aug 2017 19:00:00 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17126210 session on Mouse over hi sir, Session is not working in grid while trying to use my own session function. For Example var timoutWarning = 84000; // Display warning in 14 Mins. var timoutNow = 84000; // Timeout in 15 mins. //var timoutWarning = 30000; // Display warning in 14 Mins. //var timoutNow = 31000; // Timeout in 15 mins. var logoutUrl = 'logout.php'; // URL to logout page. var warningTimer; var timeoutTimer; // Start timers. function StartTimers() { warningTimer = setTimeout("IdleWarning()", timoutWarning); timeoutTimer = setTimeout("IdleTimeout()", timoutNow); //alert(warningTimer); //alert(timeoutTimer); } // Reset timers. function ResetTimers() { clearTimeout(warningTimer); clearTimeout(timeoutTimer); StartTimers(); $("#timeout").dialog('close'); //alert(warningTimer); //alert(timeoutTimer); } // Show idle timeout warning dialog. function IdleWarning() { $("#timeout").dialog({ modal: true }); } // Logout the user. function IdleTimeout() { window.top.location.href = logoutUrl; } Thank you Thu, 24 Aug 2017 20:51:57 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17125996 Horizontal Scroll Bar Is there a way to place the horizontal scroll bar at the top of the grid? Tue, 22 Aug 2017 19:00:04 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17124967 Export to excel and pdf does not work in my script in version 2.2 Hi, Abud, I try for hours that my grid is exported to excel. It has always worked, but in Phpgrid version 2.2, the xlsx file can not be read by Excel. The same goes for exporting to PDF. It says: "TCPDF ERROR: Some data has already been output, can not send PDF file" In the demos it works. Here is my script: https://pastebin.com/9k3gFA66 Thank you Sun, 20 Aug 2017 19:11:03 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17124136 Colon in an array for a dropdown Good evening, I'd like to insert a value with a colon in an array for a dropdown. But unfortunately this is already used as syntax. Is there a possibility? Best regards Markus Sun, 20 Aug 2017 09:26:47 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17122852 Concurrency In edit mode, how does phpgrid handle concurrency? I am guessing that last change in overrides previous changes? Or does phpgrid check for a changed record and deny the update? Thanks! Wed, 16 Aug 2017 15:15:52 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17122613 image hi sir, how to scan image using web camera? and upload to the site by using the web camera. instead of Browsing and uploading the image Thank you Wed, 30 Aug 2017 01:19:53 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17122459 Integrating latex javascript library Hi, I need to display data with some mathematical symbols like \theta \gamma etc. Can I integrate latex java script libraries to phpgrid to display mathematical symbols in in the grid which can be edited? Many thanks. Mon, 14 Aug 2017 20:10:44 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17120727 adding upload field prevents save/adding of record? I have an edit form of about 40 fields. All of them are working as expected now. Unfortunately, when I add an upload field, it shows up OK, but clicking "save" in edit form does not save the data (the form closes, no error message is displayed, but any changes made simply do not save); also, "new record" form is affected - clicking on "Submit" button has no effect at all (form does not close, new record is not created, no error message is displayed.) Here's the upload field configuration: $col["title"]="Upload Picture"; $col["name"]="PictureFileName"; $col["editable"]=true; $col["edittype"]="file"; $col["upload_dir"]="peoplepictures"; $col["editrules"]=array("ifexist"=>"rename"); $col["show"]=array("list"=>false,"edit"=>true,"add"=>true); $col["formoptions"]=array("rowpos"=>"17", "colpos"=>"1"); As soon as I remove the field, both the "new" and "edit" forms start working perfectly again. Actually, I had the upload field (as described above) work perfectly before - it seems that perhaps removing ",true" from my "$g->set_columns($cols,true);" broke the behavior? (can't use ",true" right now as I have some "select"-type lookup columns that the grid insists on saving when ",true" is added) Although I can't be sure that this is what broke the behavior, as I have also made a lot of other customizations to the form. Please let me know if any further information is necessary to diagnose the issue - thank you in advance for your assistance! Fri, 11 Aug 2017 12:27:22 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17120081 autowidth and column selection? I've recently bough full version of PHP Grid - thank you for such a wonderful tool! That said, I'm having an issue - I use "autowidth" setting for my grid. Unfortunately, when I use Column Select button and select different columns for viewing, the grid does not resize to fit the browser window afterwards. Is there a way to force the autowidth resize after new set of columns is selected by the user? Thank you in advance for your help. Tue, 08 Aug 2017 20:44:15 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17118223 Filter columns icons disapears Hi, I have a grid with 12 columns, If I filter those columns to show only 2 columns, the grid resizes and I can't export the info because the EXPORT button is not visible. Wed, 09 Aug 2017 11:06:58 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17117541 Insert Multiple Values into Table on Submit Dear Abu Ghufran, I have the a table which contains the following columns: 1. ID - AutoID 2. ClientID 3. CourierID 4. Date What I'm looking for is how to insert multiple Data into Table at once. Example: I Fill: clientID with: 2,3,4,7,9 CourierID: 1 Date: 3 Aug 2017 When I click submit, the data inserted into Table like this: ID ClientID CourierID Date 1 2 1 3 Aug 2017 2 3 1 3 Aug 2017 3 4 1 3 Aug 2017 4 7 1 3 Aug 2017 5 9 1 3 Aug 2017 Its Like the Insert into Mysql statement: INSERT INTO tableName (column1,column2,column3,column4) VALUES ('value1' , 'value2', 'value3','value4'), ('value1' , 'value2', 'value3','value4'), ('value1' , 'value2', 'value3','value4'); Is this scenario doable in phpgrid. Looking forward to your reply. Best regards, Azhar Sun, 06 Aug 2017 18:19:54 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17116363 DB2 Error Come sir how to solve the below issues syntax error, unexpected 'new' (T_NEW) in /phpgrid/lib/inc/adodb/drivers/adodb-db2.inc.php on line 514. its very urgent. thank you Thu, 03 Aug 2017 10:53:31 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17116355 Php 7 php grid is not working in php 7 how to solve this issue ? Mon, 07 Aug 2017 18:32:24 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17116349 The tree does not work correctly Good afternoon. In tree mode, when you add a branch, it branches randomly into a random branch, not into the selected branch. It also happens in demo-examples. How do I make an added branch add to the selected item? Thu, 03 Aug 2017 11:57:18 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17116079 PHP Grid Free Version Postgresql Hi All, I was trying to do the automatic installation for phpgrid. There seem to be no option for me to connect to Postgresql. The installer only give choices to connect to mysql and mysqli. After installing (connect to mysql), I realised in the 'DEMO' section, in the 'Loading' tab, there is an option to connect to Db Layer Pgsql I modified the credentials in the corresponding code, and is able to connect to Postgresql. However, when the grid tries to load my table, it shows this message: "You must have PostgreSQL installed for this demo. Also set database crendentials in this demo. Click on Code tab for source. {"page":1,"total":1,"records":"2","rows":[{"Name":"Charles","Gender":"M","Age":"24"},{"Name":"Erik","Gender":"M","Age":"25"}]}" Notice that row 3 to 5 of the message is actually the content of my table. Can anyone advise on what's the issue here? Thank you! Mon, 31 Jul 2017 07:30:02 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17114167 Search on other field Hi Abu, Using the inline search, is it possible to show the search results based on the values in a hidden column? I was thinking there might be something similar to $col["sortname"] for the search? Thanks Fri, 28 Jul 2017 18:12:26 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17113299 SEARCH_JSON OR option Greetings! I am using this construct: "groupOp":"OR" but when the query is generated it still contains an AND not an OR. Example from this https://phpgrid.desk.com/customer/portal/questions/1126469-is-it-possible-to-filter-phpgrid-data-with-more-than-one-field-search-json- post: "groupOp":"OR", "rules":[ {"field":"mk_id","op":"ne","data":"102"}, {"field":"mk_id","op":"eq","data":"A"} Thu, 27 Jul 2017 06:22:22 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17112158 Cutting Grid Load Time in Half I have some resource intensive queries that run and populate in the grid (30+ seconds). When the user click on the link to load these pages, it takes nearly 30 seconds for the grid to even show up, and another 30 seconds of it saying "Loading" before it displays data. I eventually discovered that the source code issues the same query I have, with a "LIMIT 1" on the end; and it looks like this is done to get the column names and data types. If this is the case, why not use "LIMIT 0" so it will return instantly? I change my jqgrid_dist.php to this and the grid loads and displays in 1/2 the time (30 seconds!). Is this not viable for other DB's or something? Why not do this all the time? Thu, 27 Jul 2017 05:31:12 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17111232 Forbidden error When I try to use filter on column (type word in box) I get popup with message: Forbidden You don't have permission to access /data/index.php on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. Any idea how to solve this? Thu, 27 Jul 2017 06:17:13 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17111032 Dropdown and inline editing Hi Abu, I've a column with dropdown select like this: $col = array(); $col["title"] = "Risk"; $col["name"] = "Risk"; $col["editable"] = true; $col["edittype"] = "select"; $col["editoptions"] = array("value"=>'1:Pro1/Ris1;4:Pro2/Ris2;16:Pro4/Ris4'); $cols[] = $col; I didn't inserted the $col["formatter"] = select; because I want that keys are displayed in the grid and values only in the dropdown menu. When I update a record using the inline editing, after clicking the save button the grid show values instead of keys and I need to refresh the grid to show correct keys. If I edit the record with the dialog edit it works fine. At the moment I solved this by using the $opt["reloadedit"] = true; in order to force the grid to reload, but I wanted to report you this problem. Thanks Thu, 27 Jul 2017 06:13:44 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17110442 Dropdown and autocomplete Hi Abu. Mix some dropdown and autocomplete on line 202, but it would not be working. Do you have any idea what it might be? The diagnostico field depends on the chosen value in patologia. Thank you Https://pastebin.com/LQsC2Ggc Fri, 21 Jul 2017 19:54:43 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17108879 Error with phpgrid 2.2 and mysql Hi Abu, As soon as I update the file "jqgrid_dist.php" all my tables using mysql stop working. Code I'm using for testing: https://hastebin.com/jibuxadojo.xml When I swap the mysql table for an array it works just fine, when I try this code with the 2.1.2 grid version of jqgrid_dist.php it works. The error I'm getting: Mixed Content: The page at 'https://www.domain.com/system/agenda/test' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.domain.com/home/'. This request has been blocked; the content must be served over HTTPS. Kind regards, Michael Thu, 27 Jul 2017 19:57:42 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17108871 Possibel to change the order of the search operands? Hi, need to change the order of the search operands, is this possible? Ideally would like "contains" at the top of the list instead of "equal". Thanks, Nell Fri, 21 Jul 2017 09:17:56 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17108767 Order By in edittype = select does not work Hello, I have a column with edittype = select The SQL for the select uses an Order By stmt which brings back the data in the incorrect order. The SQL resolves correctly in phpmyadmin. code: $col["edittype"] = "select"; $str = $detailGrid->get_dropdown_values("(SELECT ListID as k, name as v FROM iteminventory WHERE name = 'Special Instructions' LIMIT 1) UNION (SELECT i.ListID as k, CONCAT_WS(' ',name, IF( `QuantityOnHand`>=(`QuantityOnSalesOrder`+1),'','Not in Stock' ) ) as v FROM pal_pd_products p JOIN (SELECT name, ListID, QuantityOnHand, QuantityOnSalesOrder FROM iteminventory) i ON i.name = CONCAT(p.model,'-',p.color_code) WHERE p.status IN ('A','D','PR','RI','S') ORDER BY p.model, p.color_code LIMIT 2000)"); $col["formatter"] = "select"; $col["editoptions"] = array("value" => $str); (p.model and p.color_code are varchars) Result in phpmyadmin: 604-35 Not in Stock ** Correct order 604-76 604-95 6043-1 Result in Select dropdown: 604-76 604-95 6043-1 6047-3 ... 604-35 Not in Stock ** This should show before 604-76 Everything else works just fine. (If I remove the UNION it makes no difference) Thanks in advance Wed, 19 Jul 2017 19:34:08 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17108434 Add Abu, when I add a record and I choose a client, I have to show the address, postal code and locality, but these last three data should not be able to be modified, only informative. How can it be done? Thank you Wed, 19 Jul 2017 19:04:54 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17108231 Disable Delete & Replace option in the new importing feature Hello Abu, in the new importing feature, there is the possibility (or eventually can you add in the future) to disable the Delete & Replace option? If a customer select this by mistake, can be very dangerous because he can delete all table's records!!! Thank you very much! Alexander Wed, 19 Jul 2017 18:50:22 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17107946 multi-user application record locking - best method? Ask Hi, I am building a web-app that allows several users to perform read and write-operations on the same table. What is the smartest way of preventing that a record in the table is simultaneously edited by different users (ie. changes from user A get overwritten by user B without any of users noticing the conflicting behaviour)? Thanks! C Mon, 31 Jul 2017 08:03:12 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17106944 date picker sir, Date picker is not working correctly when we use two date columns in the first row. ie.date1 at row 1 and column 1 . while selecting the second date it points to the first date Help me to resolve the issue. Thank you Sat, 15 Jul 2017 01:08:01 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17105702 3 Nested dropdowns I'm trying to implement 3 nested dropdowns and I can not get it to work properly. the onchange event works fine but for example where I want to edit the onload event of the third nested doesn't work as it depends on the second dropdown and it depends on the first. Is it possible to do it? Thanks a lot. Best regards Thu, 13 Jul 2017 15:57:01 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17104263 column ["link"] return empty when data loaded not from mysql Hello, i loaded data not from mysql: $url="http://example.com/ip/func_iks.php"; $response = file_get_contents($url, false,stream_context_create($arrContextOptions)); $obj=json_decode($response,true); $g->table = $obj; $col = array(); $col["title"] = "Testtesttest"; $col["name"]="tab_id"; $col["width"]="40"; $col["editable"] = false; $cols[] = $col; This work perfectly. But when i try add : $col["link"] = "http://example.com/ip/sphinx.php?tabid={tab_id}"; i have empty value at {tab_id} column. Thu, 13 Jul 2017 15:57:23 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17104232 calculated fields in custom export Hi Abu, can you perhaps give a short example how to bring a calculated column value into an exported xls or pdf? I found nothing in the demos. regards Michael Wed, 12 Jul 2017 05:39:24 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17103440 Bulk Add Dear Abu Ghufran, Good day, Do you have an example for Adding Bulk data. I have invoices grid and would like to add bulk data for selected invoices which add status "Paid" or "unpaid". Thank you for your cooperation. Best regards, Tue, 11 Jul 2017 01:08:23 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17103011 Problem with readonly-when Hi Abu, I just spent few hours on this and i can't understand where i make wrong ... I have a problem with the feature "readonly-when". My field is the following: $col = array(); $col["title"] = "Description"; // caption of column $col["name"] = "description"; $col["align"] = "center"; $col["editable"] = True; $col["editrules"] = array("required"=>true, "readonly"=>true, "readonly-when"=>"check_invoice"); $col["show"] = array("list"=>true, "add"=>true, "edit"=>true, "view"=>true); $cols[] = $col; The JS function check_invoice: function check_invoice(formid) { invoice_id = jQuery("input[name=invoice_id]:last, select[name=invoice_id]:last",formid).val(); alert(invoice_id); console.log(formid); return true; } The key of the grid invoice_id. The alert is alway returning undefined. I tried to log the formid object but i'm not sure about the what i should have. Right now i have this: https://pastebin.com/fEdSvf1V Can you give any suggestion on where can i search for my problem ? Thanks Mofel Tue, 11 Jul 2017 04:20:26 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17102507 Custom Export Sir, how to Export the Amount field inorder to make some calculations in the exported file. But the file is exported as a text fields . Help me to solve this issue in the custom export. thank you Wed, 12 Jul 2017 05:08:29 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17102324 Confirm dialog with clone function Hi, there is a way to have a confirm dialog when a user click the clone button (in the Action column or in the buttons bar), exactly like with the delete function? Thanks Sat, 08 Jul 2017 10:13:07 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17100843 search Hi If i'm looking in the "search fields" for example for a 4, he shows me also the 14, 24, 34 (all with 4). Can i adjust this, that he looks only for 4? Wed, 05 Jul 2017 12:43:52 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17098425 row height Hello where can I change the row height? The height should be 15px. But it is only 25px. I took this order. $col["formatter"] = "function(cellval,options,rowdata){ return '; Can someone tell me how I managed it is the rows 15px high ?. Mon, 03 Jul 2017 12:30:06 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17096908 multi column sort I know that phpgrid support multi column sorting when using grid option sortname. However, I wonder if it is possible through ui. Thu, 29 Jun 2017 01:42:45 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17093900 Dropdown alters allotted column width I have a problem with dropdown altering the format of my edit form. My form of 350 width has 3 columns of 100 width. My first column is a dropdown and some values cause the dropdown to expand beyond the allotted 100 width. Instead of covering the other columns (which I don't mind since I am selecting a value of the dropdown) the other columns are shifted right so that, for example, if the maximum value of the dropdown is 200 width I find myself with 3 columns measuring 200, 50 and 50. How can I fix it? Thanks Thu, 29 Jun 2017 02:04:09 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17093181 Search Placeholder and autofill. Hello sir, I have 2 questions: 1. How can I set the placeholder for search field on a column ? Declaration of the column with search: $col = array(); $col["title"] = "Name"; $col["name"] = "name"; $col["fixed"] = false; $col["width"] = "200px"; $col["editable"] = false; $col["style"] = "font-size:2em"; $col["search"] = true; $cols[] = $col; 2. Having this button button with some dynamic value that comes from php variable: " . $dynamicvariable . " I did come up with this function : function auto_fill_search(clicked_id) { if(clicked_id == "button1") { document.getElementById('gs_name').value = ''; } } But it don't autofill the search input field on column name. Is there any way to populate search field from a click on a button (or ? Many thanks ! Mon, 03 Jul 2017 16:09:55 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17092933 Subgrid - Select with variable - empy results Hi, In my subgrid_detail i fetch the _POST(SN) then i want to use it to make a select...like this: // you can provide custom SQL query to display data $serial = mysql_real_escape_string($_POST['SN']); $g->select_command = "SELECT * FROM thermo WHERE SN = '$serial'"; The issue is that mysql return no results...where is the error? (if i do echo $serial i see that the SN is correct but it seems that into the query is empty) Thanks Thu, 22 Jun 2017 22:13:17 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17091183 How do I make this phpgrid work on ibmi/db2? For install.php to work on ibmi/db2 what needs to be changed. Please let me know. Thanks, Sudhi Thu, 22 Jun 2017 22:11:54 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17090827 Global Search Dear, I bought the product last week to implement on my website. Everything works OK but I need a functionality to simplify the search of my clients in the table. I need a GLOBAL SEARCHING functionallity, like a text box where you can write your search and it filters by any value in any column. There is an axample from PHPGRID.COM: https://phpgrid.com/example/multiple-fields-global-search/ Is it this possible to have this functionality in this product? Thanks. Gabriel. Sat, 01 Jul 2017 19:24:20 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17090731 text-decoration when exporting to PDF Hi, I've a cell with a link to a fancybox. I remove the underline decoration style in gridview with: style='text-decoration:none' But, when exports to PDF, the underline appears. Thanks Sun, 25 Jun 2017 11:46:40 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17090322 Row height exporting grid Hi, Abu I've a column like this: $col = array(); $col["title"] = "DESCRIPCION"; $col["name"] = "t_descripcion"; $col["width"] = "200"; $col["editable"] = true; $col["edittype"] = "textarea"; $col["editoptions"] = array("rows"=>2, "cols"=>100); $cols[] = $col; If in a row, this column have any data, when I export grid to PDF file that is higher than the others: http://es.tinypic.com/r/2lihk6h/9 Thanks! Thu, 22 Jun 2017 01:14:12 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17090308 I want to share the solutions When the user change the data row and saved the function $opt["edit_options"]["beforeSubmit"] = "function(post,form){ return validate_form_once(post,form); }"; It is perfect. But it's necessary show outside grid total sum. this is my solutions. $opt["edit_options"]["afterSubmit"] = "function(){ addsalegrid();return [true,''];}"; function addsalegrid() { numberform = "";//when the invoice number is diferent to ID record. functionaddsale(numberform);//Show total outside the grid. } I hope to help everybody! thank you Abu for your phpgrid! Thu, 22 Jun 2017 00:57:07 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17089760 File upload Hi ! I have a couple of questions regarding file upload, since i am not able to have it working as i think it should be. 1. I added a file field, mainly inspired by the demo file. I'm able to upload one or multiple files, and they are showing in view or list. BUT, when i go in edit mode, the only option i have is "Reset" and no option to delete. Reset simply reset this field to empty. Is this normal ? 2. When i click the edit button to the right, or when i double click (i added the function ondblclick.... editGridRow), the opened form does not include file upload. Field is present in the form, but hidden. However, when i select the line and use the top edit button, the upload field is present. 3. I tried renaming the file name in on_insert function and the file remains the same and isn't renamed.. why ? Thanks for your help ! Vincent Thu, 22 Jun 2017 22:13:22 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17089170 Drop down labels Hello Abu, I am trying to display a drop down list showing all countries like this $col["formatter"] = "autocomplete"; // autocomplete $col["formatoptions"] = array("sql"=>"SELECT DISTINCT ShortCountryName as k, Two_letter_CountryCode as v from countrieslist", "update_field"=>"ep_country","search_on"=>"Two_letter_CountryCode"); $str = $g->get_dropdown_values("SELECT DISTINCT ShortCountryName as k, Two_letter_CountryCode as v from countrieslist"); $col["stype"] = "select"; // enable dropdown search $col["searchoptions"] = array("value" => ":;".$str); $cols[] = $col; It only display display the value, not the label (ShortCountryName) If I reverse ShortCountryName and Two_letter_CountryCode , it display the full country name... Can you help? Thanks Cedric Sun, 25 Jun 2017 11:52:37 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17088890 sql SELECT with german Umlauts Hi, I'm using the Grid view to show Results of a form. The form generates the SQL Source for the gridView ... everything works fine. Only if I search for something with an German umlaut, the grid view "shows no data found" (in SQL Server is a result). For Example SELECT Name, vorname WHERE Name Like '%Müller%' MySQL collation ist utf8_general_ci thanks for your help Mon, 28 Aug 2017 19:12:01 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17088664 Master Detail Fancy in Laravel I can't use option "Master Detail Fancy" in Laravel. When I click on link, app doesn't show modal form. URL looks like this: .../public/client2#box_detail_grid. Sat, 17 Jun 2017 16:02:18 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17084433 PostgreSQL PHP Generator Hi, I am newer persion to development. Can i used phpgrid for the database PostgreSQL? is any help is available ? Sat, 17 Jun 2017 12:22:46 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17084334 footer-row summary in filter Hello Abu, im trying the footer-row form and i notice that there's three summary totals, a) total page, b) total page accumulated and c) Grand total but when i filter for something field, the total a) it's ok, but the b) doesn't update, how do that? thanks Thu, 15 Jun 2017 11:53:34 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17082402 save row after selected value in select dropdown Hi, How can I automaticaly save a record (row) after selecting a value (Yes,No) in a select box? Tue, 13 Jun 2017 19:52:03 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17081615 Generating .pdf popup using jsPDF library Hello, i have this code to generate .pdf popup: // JSPDF auto generate pdf on edit $grid["add_options"]["afterSubmit"] = 'function(response) { if(response.status == 200) { if (response.responseText) { var data = JSON.parse(response.responseText); if (data && data.msg) fx_success_msg(data.msg,data.fade); } var rowid = jQuery("#list1").jqGrid("getGridParam","selrow"); var row = $("#list1").getRowData(rowid); var cliente = row["customer"]; var llegada = row["staff_note"]; var minutos = row["reference_no"]; var total = row["total"]; var recobro = row["updated_at"]; var estado = row["sale_status"]; var pre_puntos = row["suspend_note"]; var puntos = parseInt(minutos) + parseInt(pre_puntos); switch (estado) { case "Completed": total = recobro break; default: total = row["total"] break; } // JSPDF, docs: http://rawgit.com/MrRio/jsPDF/master/docs/global.html // Default export is a4 paper, portrait, using milimeters for units var doc = new jsPDF({orientation: "portrait", unit: "mm", format: [210, 80]}); // set font size doc.setFont("helvetica"); doc.setFontType("bold"); doc.setFontSize(16); doc.setFontType("italic"); doc.text("SHOPPING EXPRESS",4,10); doc.setFont("courier"); doc.setFontType("normal"); doc.setFontSize(14); doc.text("NIT: 30238315-7",4,14); doc.text("CC Nuestro Urabá",4,18); doc.text("Apartadó, Antioquia.",4,22); doc.text("------------------------",4,24); doc.setFont("courier"); doc.setFontType("normal"); doc.setFontType("bold"); doc.setFontSize(12); doc.text("Factura N°:" + row["id"],4,26); doc.text("Tarifa minutos: " + row["reference_no"], 4, 30); doc.text("Carro N°: " + row["attachment"], 4, 34); doc.text("Salida:" + row["note"], 4, 38); doc.text("Llegada:" + llegada, 4, 42); doc.text("Estado: " + row["sale_status"], 4, 46); doc.setFontType("normal"); doc.text("Subtotal: $" + total, 4, 50); doc.setFontType("bold"); doc.text("Total: $" + total, 4, 54); doc.setFontSize(6); doc.setFontType("italic"); doc.text("Firma acudiente", 4, 57); doc.text("_________________________________________________________", 4, 66); doc.setFontSize(10); doc.setFontType("bold"); doc.text(''+ row["customer"], 4, 72); doc.text("Tus puntos disponibles: " + puntos, 4, 78); doc.text("----------------------------------",4,81); doc.autoPrint(); // this opens a new popup, after this the PDF opens the print window view window.open(doc.output("bloburl"), "_blank","toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes,top=200,left=350,width=600,height=400"); return [true,""]; } }'; But not works... Thank you by your help! Thu, 15 Jun 2017 11:23:25 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17081171 Custom querie for virtual columns Hello Abu, I have this function to get values in different tables: function bonus_data($data) { $t = $data["params"]["reference_no"]; $client_id = $data["params"]["customer_id"]; global $h; $res = $h->execute_query("select id, name, company, award_points from sma_companies WHERE id = '$client_id'"); #phpgrid_error($h->con->errormsg()); $arr = $res->GetRows(); #phpgrid_error($arr); $document = $arr[0]["name"]; $client_name= $arr[0]["company"]; $points= $arr[0]["award_points"]; } As this values are from table different to sales_table (grid table) then i need it values in same grid as Virtual Columns getting Cols: var rowid = jQuery("#list1").jqGrid("getGridParam","selrow"); var row = $("#list1").getRowData(rowid); It's possible? Thank you again! Mon, 12 Jun 2017 11:35:43 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17079980 Loading jsPDF in modal window Hello, I have this to generate PDF using library jsPDF: print = function () { var rowid = jQuery("#list1").jqGrid("getGridParam","selrow"); var row = $("#list1").getRowData(rowid); // JSPDF, docs: http://rawgit.com/MrRio/jsPDF/master/docs/global.html // Default export is a4 paper, portrait, using milimeters for units var doc = new jsPDF() // set font size doc.setFontSize(12); doc.text("Invoice #" + row["id"],10,10); doc.text("Cliente: " + row["customer"],10,14); doc.text("Total: " + row["total"], 10, 18); doc.text("Fecha: " + row["due_date"], 10, 22); //doc.save("a4.pdf"); doc.autoPrint(); doc.output("dataurlnewwindow"); // this opens a new popup, after this the PDF opens the print window view }); And this buttton to call function: $buttons_html = "Print</>"; Show me error and not load file .pdf Thank you! Sat, 10 Jun 2017 20:02:28 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17079082 Add form depend by value Hi Abu, I've a question for add records. It's possible change default and type by value of field in add form ? Exemple if value of field TYPE_INSERT is 1 the user can insert a text. Instead in valude of field TYPE_INSERT is 2 the possibility is true / false by checkbox. Thanks in advance. Nicola Mon, 12 Jun 2017 11:34:45 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17078821 Date Diff Hi... I work this to update a 3nd col named 'meres' with Deduction date_pire and date_epistrvfh, but is not work, have you any idea... function update_client($data) { $selected_ids = $data["auto_id"]; $d = $data["params"]; $d["meres"] = $meres; $meres='SELECT (TO_DAYS(date_pire)-TO_DAYS(date_epistrvfh) )as meres FROM person_ka_aposp'; mysql_query("UPDATE person_ka_aposp SET meres=$meres WHERE auto_id IN ($selected_ids)"); } Thu, 08 Jun 2017 20:28:16 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17074712 Select 2 Tags fields and export to Excel / PDF problem I'm using Select 2 Tags in a field with the parameter $col["formatter"] = "select" to show values instead of keys in the column and it works fine. But when I export to Excel or PDF this doesn't work and keys instead of values are displayed. I have read in other posts that this problem can be solved with the use of "on_render_excel" and "on_render_pdf" but I cannot find specific code to handle multi-select fields. Can anyone help, please? Thank you very much Tue, 13 Jun 2017 21:38:11 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17074204 Compatibility with PHP 7 Hello, This framework works with PHP 7? Wed, 07 Jun 2017 13:53:46 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17074019 Auto open add form after insert Hello, It's possible to open automatically form Add after to insert? Thank you! Wed, 07 Jun 2017 13:50:18 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17073871 insert another autocomplete script in "edit" Hello, I need add function autocomplete from "https://www.devbridge.com/sourcery/components/jquery-autocomplete/" to edit input. When I enter values in the input field when editing an entry, I need to call the code: $('#auotocomplete1').autocomplete({ serviceUrl: 'http://xx.xx.xx.xx/query/1.php', paramName: 'name', delimiter: /(,|;)\s*/, }); JSLib including Wed, 07 Jun 2017 13:48:56 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17073748 description below caption Hi, is it possible to display a Description or instructions below the caption? Ex: (Caption) Invoices --------------------------------------------------- (description) Invoices sorted by the most current date. Only open invoices are listed here; for closed invoices, visit .... --------------------------------------------------- (toolbar) Thanks W Thu, 08 Jun 2017 20:16:43 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17073298 hide grid when no rows exists Hello, is there a way to hide or not show the grid when there are no rows? Scenario: there's 2 grids on one page and user will select a row from table 1. That row will appear on table 2. However, at the beginning, table 2 will be empty so I want to hide it for a cleaner ui and less confusing. Thanks W Sat, 10 Jun 2017 12:07:43 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17073294 Master Multi Detail - passing multiple values Hi, using Master Multi Detail example I created grid form with 3 tables. I want to select more then one value from master table and pass ids to second and third grid form - but get only the last one selected. Example code: https://pastebin.com/4QUfgbsE In short, i want to use: "SELECT id,client_id,invdate,amount,tax,total FROM invheader WHERE client_id IN ( $id )" Not: "SELECT id,client_id,invdate,amount,tax,total FROM invheader WHERE client_id = $id " Wed, 07 Jun 2017 13:30:09 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17072715 how read primary key in event Hello Abu, how i read the primary key in on_insert, on_update, on_after_insert and on_after_update events??? in the function, i have this: function add_client($data) { $id = $data["params"]["idcli"]; $nombre = $data["params"]["nombre"]; } $nombre have value ("Carlos"), but $id(primary key) do not have any value in any events mencionated at first, WHY? don't care if the primary key is defined as id, or idcli, can't be read!!!! thanks a lot... Wed, 07 Jun 2017 14:09:40 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17071463 How to make a dynamic link from a cell value? Hi, I need to link to a php page and pass the cell value as a URL parameter. In the forum I found this answer from Abu: $col["link"] = "link.php?list1_columname={columname}&c=". $_GET["code"]; But I'm unclear what some of the variables are: list1_coulumname {columname} and "code" In my application the table field is "idx" the title of the column on the grid is "App Number" and the URL parameter I want to pass is "app=insert value of idx here" to a php page named edit.php. For example, if the cell contained the value 1234 I want the cell to become a link to edit.php?app=1234 when the user clicked the cell. How do I do that? Thanks in advance for any help. Sorry, still a NOOB here and trying to learn as fast as I can. Thu, 22 Jun 2017 00:56:48 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17070617 Multiple Grids in separate folders I would be using the phpgrid on one web site that may have several different sections displaying data from different tables and databases. Let's assume I have the registered version (but right now I have the free version right at the moment). Here is how I was thinking of installing phpgrid: Server root: "\www" Phpgrid location: "\www\phpgrid" In this case lets say then that I want two different grids with different tables. What files would I have in each module (folder) I am pretty sureit would be at least the one PHP file with the phpgrid properties? \app\module1 \app\module2 would I have a separate config.php in each folder that points to the phpgrid and indicate the different table/view for each grid? Thank you so much for the help! Sat, 03 Jun 2017 20:54:32 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17070522 strange formatting results with exporting to excel - $objPHPExcel Hi Folks, we're offering an exporti on one of our databases. Most fields contain text or numbers. There is one mixed field of serial numbers, which may contain letters and digits. As long as the field contains at minimum one letter everything is fine. Excel recognizes it as text, so far so good. As soon as the field contains only numbers and its length is less than 8 also everything is fine. BUT as soon the length is 8 or more Excel will crash the number into some crap. I was looking for some formatting stuff during the export e.g $objPHPExcel->setActiveSheetIndex(0)->getStyle("G$r")->getNumberFormat()->setFormatCode('0.00'); but I could not find the right stuff on declaring the default data type in the excel sheet. Any idea? Best regards Michael Fri, 09 Jun 2017 11:04:01 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17070229 How to insert paragraph in a textarea field in excel view? Hello Abu How to insert paragraph in a textarea field in excel view? Example: $col["edittype"] = "textarea"; // render as textarea on edit $col["editoptions"] = array("rows"=>6, "cols"=>42); // with these attributes When I write in this textarea, I can not create paragraphs. Thank you Wed, 14 Jun 2017 07:32:38 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17064828 Disable keys in HTML Custom Form textbox Hello, I have this code tu disable keys C and V, but where to insert for Custom Form in phpgrid? document.onkeydown = function() { if (keyCode === 67||keyCode === 86) { //C, V will be disabled. preventDefault(); alert('not allowed'); } return false; } Wed, 07 Jun 2017 13:56:30 +0000 https://phpgrid.desk.com/customer/en/portal/questions/17064066