0

I have a jqgrid that maintains a database file.

The edit/add forms that show up are the basic information and the rest is set to default values.

What I would like to do is allow the user to click a button in the form and then give them access to the full information.

What is the best approach to accomplish this?

Thank you.

Note: There are many more columns. I shortened the list for example purposes.

Here is a portion of the code:

$(function () {    

jQuery("#PClist").jqGrid({
url: "pyg280cload.php",
editurl: "pyg280cedit.php",
datatype: "json",
mtype: "POST",
colNames:["Row ID", "State", "Seq #", "Active", "Select Stores", "Pay Type","Hours Required", "Hourly Increment", "Include Tips"],
colModel:[{name: "PCROWID", width: 60, align: "center", editable:true, hidden:true, editoptions: {readonly:true}},
{name: "PCST", width: 60, align: "center", editable:true, editoptions: {readonly:true}, editrules: {required:true, number:false}},
{name: "PCLSEQ", width: 60, align: "center", editable:true, editoptions: {readonly:true}, editrules: {required:true, number:true}, formatter:'number', formatoptions:{decimalPlaces: 0, defaultValue: '0'}},
{name: "PCACTIVE", width: 60, align: "center", editable:true, editrules: {edithidden:true}, edittype:"checkbox", editoptions: {value:"Y:N"}},
{name: "SelectStores", width: 80, align: "center", editable:true, hidden:true, editrules: {edithidden:true}, edittype:"button", editoptions: {value:"Select Stores"}},
{name: "PCPAY", width: 60, align: "center", editable:true, edittype:"select", editoptions:{value:{H:'Hourly', S:'Salary', B:'Both'}}},
{name: "PCHRSREQ", width: 60, align: "center", editable:true, hidden:true, editrules: {number:true, edithidden:true}},
{name: "PCHRSINCR", width: 60, align: "center", editable:true, hidden:true, edittype:"checkbox", editoptions: {value:"Y:N"}},
{name: "PCTIPS", width: 60, align: "center", editable:true, hidden:true, editrules: {edithidden:true}, edittype:"checkbox", editoptions: {value:"Y:N"}},

...

Ray Marsh
  • 13
  • 9
  • Your question is not clear at all. Which version of jqGrid do you use? What kind of editing mode do you use? Please post your grid code. A fiddle would be great to display what do you wanna accomplish exactly. Do you use external buttons or you add buttons inside jqGrid itself. – Dipen Shah Oct 15 '15 at 19:04
  • Actually I do not know what version of jqgrid we are using. How do I find out? I cannot get fiddle to work with jqgrid at all. I'm not sure what I'm doing wrong there. What I am doing is hiding most of the columns and then showing a subset of the columns in the edit form. What I would like to do is allow the user to click a button and expand the form to show them all the columns that can be edited. – Ray Marsh Oct 16 '15 at 17:37
  • Check your jqGrid code. On the top you will have a jqGrid script file included. See what version is of the file. – Dipen Shah Oct 16 '15 at 17:39

0 Answers0