Recent Posts

Pages: [1] 2 3 ... 10
1
Help for ParamQuery Grid (free version) / Re: The grid is not being filled
« Last post by celsol on January 21, 2017, 08:09:53 pm »
I forgot to say that from the console I can see that php returns a valid json
2
ParamQuery Pro Evaluation Support / Re: Select Drop Down Will Not Keep Value
« Last post by paramquery on January 21, 2017, 08:06:18 pm »
Sorry, I was not clear enough in my previous post.

If pqSelect is being used in the code, then pqSelect js and css files need to be included in the document, otherwise not.

I've commented the pqSelect code from your jsfiddle and it works fine now,

http://jsfiddle.net/4j6ya0L1/3/


BTW it's very useful to look at browser console for any errors if something doesn't work as intended.
3
Help for ParamQuery Grid (free version) / The grid is not being filled
« Last post by celsol on January 21, 2017, 07:32:53 pm »
Hi! I'm new to pqgrid. I modified a demo script but it does not work.
Remote access via PHP.
The problem is that getData, on line 39, always return UNDEFINED...
Could someone help me, please?

The javascript:
<!DOCTYPE html>
<html>
<head>
<!--jQuery dependencies-->
   <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/themes/base/jquery-ui.css" />   
   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
   <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<!--PQ Grid files-->
    <link rel="stylesheet" href="../grid-2.1.0/pqgrid.min.css" />
    <script src="../grid-2.1.0/pqgrid.min.js"></script>
<!--PQ Grid Office theme-->
    <link rel="stylesheet" href="../grid-2.1.0/themes/office/pqgrid.css" />
<script>
$(function () {
    var obj = {
        width: 700,
        height: 400,
        numberCell:{resizable:true,title:"#",width:30,minWidth:30},
//       editor: {type: 'textbox'},
        title: "ParamQuery Grid with JSON Data",
        resizable:true,
        scrollModel:{autoFit:true, theme:true},
        draggable:true
    };
    obj.colModel = [{
               title: "Procedimento",
               width: 150,
               dataIndx: "procedimento"
                }];
    obj.dataModel = { location: "remote",
                  dataType: "JSON",
                 method: "GET",
                 url: "get_procedimentos_cnes_1.php?cnes=2792176",
                      error: function(jq){
                         alert("jq error");               
                         console.log(JSON.stringify(jq));
                      },
                      getData: function (dataJSON) {
                          console.log(dataJSON.data);
                         return { data: dataJSON.data };
                    }};
   $("#grid_json").pqGrid(obj);
});
</script>   
</head>
<body>
<div id="grid_json" style="margin:100px;"></div>
</body>

</html>


The PHP:
<?php

session_start();
include "db_connect.php";
$cnes = $_GET['cnes'];
$sql = "SELECT DISTINCT
        b.vl_sh procedimento
    FROM
        aih_rd a,
        tb_procedimento b
    WHERE
            a.proc_rea = b.co_procedimento
            AND a.cnes = '$cnes'
";
//$_SESSION['sqlGrid'] = $sql;
$res = mysqli_query($con, $sql);
if (!$res) {
    echo "erro na consulta: " . mysqli_errno() . $sql;
}
$dbdata = array();
while ($row = $res->fetch_assoc()) {
    $dbdata[] = $row;
}
$res->close();
header('Content-Type: application/json');
//Print array in JSON format
echo json_encode($dbdata);

?>
4
ParamQuery Pro Evaluation Support / Re: Select Drop Down Will Not Keep Value
« Last post by Bawzee on January 20, 2017, 09:56:54 pm »
Thank you again for your assistance with this matter. So here is the fiddle:  http://jsfiddle.net/Bawzee/4j6ya0L1/2/

So were starting with a  blank table and will be adding the first record by clicking the Add Domain button.  When I go to edit the row, all fields are editable and retain their data except for the Registrar Select Drop Down.  I'm able to select an option, but when I tab out or click another cell in the data I selected disappears from the Select cell.
5
ParamQuery Pro Evaluation Support / Re: Select Drop Down Will Not Keep Value
« Last post by paramquery on January 20, 2017, 07:56:34 pm »
pqSelect is an add on to enhance functionality of select lists; it's not a required dependency.
6
ParamQuery Pro Evaluation Support / Re: Select Drop Down Will Not Keep Value
« Last post by Bawzee on January 20, 2017, 06:51:13 pm »
Yeah, I thought my code appeared correct based on the Demo examples, which made it all the more confusing as to why it does not work.

Before I provide a fiddle, I noticed that there is a pqSelect folder in the Paramquery Pro download that contains pqselect js and css files, yet I saw no indication on this page that these were required dependencies for version 3.3.  http://paramquery.com/pro/tutorial   

Please confirm this is the case.

Thank you.
7
Help for ParamQuery Pro / Re: PQ Grid examples of images
« Last post by paramquery on January 20, 2017, 04:13:55 pm »
That's similar to row detail feature of pqGrid.  http://paramquery.com/pro/demos/detail
 
Replace the code in HTML tab with this, click on "Edit and Run" button and you would get a smiley picture in the Address tab of the detail row.

Code: [Select]
<div id="grid_md" style="margin:5px auto;"></div>

<!--script tag used to define detail template-->
<script type="text/pq-template" id="tmpl">
    <div class="pq-tabs" style="width:auto;">
        <ul>
            <li><a href="#tabs-2">Products</a></li>           
            <li><a href="#tabs-1">Address</a></li>           
            <li><a href="#tabs-3">Dates</a></li>
        </ul>
        <div id="tabs-2">
        </div>       
        <div id="tabs-1" class='pq-native-select pq-no-capture'>
            <p><b>Shipping Address:</b> <#=ShipAddress#></p>
            <p><b>Shipping City:</b> <#=ShipCity#></p>
            <p><b>Shipping Region:</b> <#=ShipRegion#></p>
            <p><b>Shipping Postal Code:</b> <#=ShipPostalCode#></p>
<img src="http://www.w3schools.com/tags/smiley.gif" />
        </div>       
        <div id="tabs-3" class='pq-native-select pq-no-capture'>
            <p><b>Order Date:</b> <#=OrderDate#></p>
            <p><b>Required Date:</b> <#=RequiredDate#></p>
            <p><b>Shipped Date:</b> <#=ShippedDate#></p>
        </div>
    </div>
</script>
8
Help for ParamQuery Pro / PQ Grid examples of images
« Last post by dataSQL_ on January 20, 2017, 05:25:23 am »
Thank you for your wonderful patience, got it running... http://35.167.46.75/

Are there any examples of images being displayed in PQGrid, similar to:
9
Help for ParamQuery Pro / Navigation Issues in editable grid
« Last post by ralph1996 on January 20, 2017, 03:41:42 am »
HI, I am having issues with tab navigation in grids.  Teh issue Iam seeing is that on Internet Explorer tabbing between editable cells behaves differently (worse) than in Chrome.  When in an editable cell you press tab, the next cell is opened for edit but immediately closes and you are left wiht the focus on the cell but not in edit mode.  In Chrome this works correctly and you can tab from cell to cell and the editors open correctly.

Example code is at the bottom of this post.  I used your % Column Widths sample and deleted all teh Javascript in there and replaced it with the code below.  Run this on both Chrome and IE.  Click on the top left cell and both will go into edit mode.  THen tab to the next column and you will see the disparity.

A Second issue we are having is that when you tab to the end of the grid (bottom right cell) and then click tab again nothing happens.  We wodul expet that the focus wodul leave the grid and proceed to the next control in the tab order.  This may or may not be another ParamQuery Grid.  Is there a way to trap the navigation and when there is no cell to navigate to change teh focus to the next control in teh tab order?

THANKS!!!


// CODE

       $(function () {
 var _phCE_Shareholders_data = {"pqObj":{"rowBorders":true,"selectionModel":{type: 'cell'},"roundCorners":false,"scrollModel":{"pace":"fast","theme":true,"autoFit":true},"columnTemplate":{"align":"left","editable":false,"maxWidth":700,"resizable":false,"minWidth":30},"height":"flex","virtualY":false,"columnsBorders":true,"resizable":false,"postRenderInterval":100,"virtualX":false,"collapsible":{on: false, toggle: false},
                                  "colModel":[{"dataIndx":"PersonId","title":"Person ID","align":"right","minWidth":40,"width":40,"dataType":"integer","editable":false,"hidden":true,"editor":false}
                                          ,{"dataIndx":"TitleId","title":"TitleId","align":"right","minWidth":40,"width":40,"dataType":"integer","editable":true,"hidden":true,"editor":{"select":true},"ddcValueDefault":6}
                                          ,{"dataIndx":"Title","title":"Title","doExpand":true,"width":150,"dataType":"string","editable":true,"hidden":true,"editor":{"valueIndx":"TitleId","type":"select","labelIndx":"Title","options":[{"TitleId":6,"Title":"Shareholder"}],"cls":"defaultTextBox"},"minWidth":150,"maxWidth":150}
                                          ,{"dataIndx":"Name","title":"Name","doExpand":true,"doFlex":true,"dataType":"string","editable":true,"editor":{"select":true},"ddcValueDefault":" "}
                                          ,{"dataIndx":"Data","title":"Ownership","width":85,"dataType":"float","editable":true,"editor":{"select":true},"format":"##0.00%","align":"right","minWidth":85,"maxWidth":85}]
                                  ,"swipeModel":{ on: false},"title":"Shareholders","numberCell":{show: false},"dataModel":{"location":"local","sorting":"local"},"editModel":{"onTab":"nextEdit","onSave":"nextEdit","clicksToEdit":1},"hoverMode":"","editor":{ type: 'textbox', cls: 'defaultTextBox', select: true },"dragColumns":false,"editable":true,"showTop":true,"sortModel":{"ignoreCase":true,"single":false},"width":740},
                        "data":[{"pqRowId":0,"PersonId":"27","TitleId":"6","Title":"Shareholder","Name":"abc","Data":"70"},{"pqRowId":1,"PersonId":"26","TitleId":"6","Title":"Shareholder","Name":"xyz","Data":"50"}]};

        var obj = _phCE_Shareholders_data.pqObj;
        obj.dataModel.data = _phCE_Shareholders_data.data;
        $("#grid_json").pqGrid(obj);
    });
10
Help for ParamQuery Pro / Re: Create First ParamQuery Grid
« Last post by dataSQL_ on January 19, 2017, 09:35:23 pm »
Excellent, thank you.

Do you have an example for displaying images in cells, such as product images?
Pages: [1] 2 3 ... 10