I want to bind the textbox control with object's property. As in below code, its all work fine except, textbox control not bind the asspciated property mentioned in "name,index".
Below is my jqgrid code:
$('#g).jqGrid({
ajaxGridOptions: {
error: function () {
$('#g')[0].grid.hDiv.loading = false;
alert('An error has occurred.');
}
},
url: '@Url.Action("Getvalues", "cntrollName")/' + 0,
postData: { ID: rowID },
datatype: 'json',
jsonReader: { root: 'List', page: 'Page', total: 'TotalPages', records: 'TotalCount', repeatitems: false, id: 'ID' ,''},
mtype: 'GET',
colNames: ['GrdID', Name],
colModel: [
{ name: ID, index: ID, hidden: true },
{ name: 'FullName', index: 'FullName', width: 150 },
{
name: 'txtVAlue', index: txtVAlue, width: 40, align: 'center', formatter: function (cellValue, option) {
return '<input type="text" name="txtBox" id="txt_' + option.rowId + '" />';
}
}],
pager: $('#g),
sortname: ID,
rowNum: 10,
width: '525',
height: '100%',
viewrecords: true,
beforeSelectRow: function (rowid, e) {
return true;
},
sortorder: 'desc'
}).navGrid('#g, { edit: false, add: false, del: false, search: false, refresh: false });
Please suggest me how i could bind the textbox with field value. Please also suggest me , is it possible to change the color and font size of jqgrid.
Thank You