i using jqgrid to display two columns namely propertyname,value. at run time i need to edit value column and save it i am using below code
$(document).ready(function () {
var mydata = [
{ propertyname: "one", "value": " " },
{ propertyname: "two", "value": " " },
{ propertyname: "three", "value": " " }
];
$("#JQGrid").jqGrid({ //set your grid id
data: mydata, //insert data from the data object we created above
datatype: 'local',
width: 500, //specify width; optional
colNames: ['PropertyName', 'Value'], //define column names
colModel: [
{ name: 'propertyname', index: 'propertyname', width: 50, editable: false },
{ name: 'value', index: 'value', width: 50, editable: true, sortable: true, edittype:'text'}
], //define column models
//set your pager div id
sortname: 'id', //the column according to which data is to be sorted; optional
viewrecords: true, //if true, displays the total number of records, etc. as: "View X to Y out of Z” optional
sortorder: "asc", //sort order; optional
caption: "jqGrid Example" //title of grid
});
});