0
     $("#list_records").jqGrid({
                    url: "getGridData.php",
                    datatype: "json",
                    mtype: "GET",
                    colNames: ["UserId", "Mobile Number"],
                    colModel: [
                        { name: "id",align:"right"},
                    { name: "mobilenumber"}

                    ],
                    pager: "#perpage",
                    rowNum: 10,
                    rowList: [10,20],
                    sortname: "id",
                    sortorder: "asc",
                    height: 'auto',
                    viewrecords: true,
                    gridview: true,
                   // editurl: 'getGridData.php'
                    caption: ""

                }); 
 jQuery("#list_records").jqGrid('navGrid','#perpage',{edit:true,add:true,del:true});

Its work fine,when i click a add button the from will be opened enter image description here like this.How to add the text box in this form.when I add the edit url the working page will show as blank page..

Nandy
  • 73
  • 7

1 Answers1

0

You should add the property editable: true in all columns of colModel, which you want to allow to edit. For example you can use

colModel: [
    { name: "id", align:"right" },
    { name: "mobilenumber", editable: true }
]
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • @Nandy: I'm not sure, which problem you have with URL. Do you need one *common* URL for form Add/Edit/Delete? Then you need just use `editurl` option of jqGrid (which is commented in your code). Which **version** of jqGrid you use and from which **fork** of jqGrid ([free jqGrid](https://github.com/free-jqgrid/jqGrid), commercial [Guriddo jqGrid JS](http://guriddo.net/?page_id=103334) or an old jqGrid in version <=4.7)? – Oleg Apr 26 '18 at 15:08