Paramquery demos

170 views
Skip to first unread message

Gil Garnsey

unread,
Jul 21, 2013, 6:45:12 PM7/21/13
to param...@googlegroups.com
I'm attempting to replicate the add, edit, delete demo found in the Data Manipulation section. I had to make some modifications in order to populate the data as I don't have the nasdaq_market_table, but have successfully gotten my data to display. My question is related to the add and edit buttons.

Nothing happens when I click either of these buttons. I have been able to determine the js logic is execute but no form displays. Is there something else I need to be adding to my code to get the popup forms to display, or do I have something wrong with my code?

Gil Garnsey

unread,
Jul 21, 2013, 10:27:41 PM7/21/13
to param...@googlegroups.com
Based on some additional tests it appears I am indeed missing some code.

By adding the following to my HTML page

<div id="popup-dialog-crud"></div>

the edit and add dialog boxes to appear. However, nothing is displayed. They do seem to be doing something, because if I click the add or update buttons on these dialog boxes, a blank record is added or current record changed to blanks respectively.

I'm guessing my problem is somewhere in this code and in particular with the var $frm = $("form#crud-form"); line. Do I need to declare something in my HTML for the form#crud-form selector? If yes - what and where?

                var DM = $grid.pqGrid("option", "dataModel");
                var data = DM.data;
                var row = data[rowIndx];
                var $frm = $("form#crud-form");
                $frm.find("input[name='Id']").val(row[0]);
                $frm.find("input[name='Name']").val(row[1]);
                $frm.find("input[name='Country']").val(row[2]);

Gil Garnsey

unread,
Jul 21, 2013, 11:18:40 PM7/21/13
to param...@googlegroups.com
After what seems like hours of trial an error I found the answer:

            <div id="popup-dialog-crud">
                <form id="crud">
                    <input type="text" name="Id"  width="20">
                    <input type="text" name="Name"  width="20">
                    <input type="text" name="Country" width="20">
                </form>
                </div>


On Sunday, July 21, 2013 6:45:12 PM UTC-4, Gil Garnsey wrote:
Reply all
Reply to author
Forward
0 new messages