Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jocavill

Pages: [1]
1
Oh no - the question disappeared!

What I wanted to ask was with the given code snippet, I can't get the id column to automatically update like the demos. Is this just a pro feature?

2

    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/themes/base/jquery-ui.css" />
    <link rel="stylesheet" href="/packages/ParamQuery/pqgrid.dev.css" />
    <!--<link rel="stylesheet" href="/packages/ParamQuery/themes/office/trax.css" />--->
    <div id="grid_custom_editing" style="margin:auto;"></div>
    <script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
    <script src="/packages/ParamQuery/pqgrid.min.js"></script>
    <script type="text/javascript">
        $(function () {

            var data = [{
                ShipViaId: 'SE', ShipVia: 'Speedy Express'
            }];

            var colM = [
                { dataIndx: "ShipViaId", title: "Shipping Via ID", editable: false },
                { title: "Shipping Via", dataIndx: "ShipVia", width: 110,
                    editor: {
                        type: 'select',
                        valueIndx: "value",
                        labelIndx: "text",
                        options: [{"value": "", "text": ""}, {"value": "SE", "text": "Speedy Express" }, {"value": "UP", "text": "United Package" }, {"value": "FS", "text": "Federal Shipping"}] ,
                        mapIndices: { "text": "ShipVia", "value": "ShipViaId" }
                    },
                    validations: [{ type: 'minLen', value: 1, msg: "Required"}]
                }
            ];
            var dataModel = {
                dataType: "JSON",
                location: "local",
                data: data
            };
            $("div#grid_custom_editing").pqGrid({
                colModel: colM,
                dataModel: dataModel,
                editModel: {
                    saveKey: $.ui.keyCode.ENTER,
                    keyUpDown: false,
                    clicksToEdit: 1
                },
                historyModel: { checkEditable: false },
                numberCell: { show: false },
                resizable: true,
                scrollModel: { autoFit: true },
                selectionModel: { type: 'cell' },
                showBottom: false,
                title: "Shipping Orders <b>(Custom editing)</b>"
            });
        });

    </script>

Pages: [1]