Hello..
please view the code below.
$('#table1').jqGrid({
url: 'XMLFile1.xml',
datatype: "xml",
height: 'auto',
colModel: [
{ name: 'Title', width: 80, xmlmap: "CATALOG>CD>TITLE"
},
{ name: 'Artist', width: 90, xmlmap: "CATALOG>CD>ARTIST"
},
{ name: 'Image', width: 55,editable: true,
formatter: function () {
return "<img src='css/images/resize.jpg' />";
}
},
],
xmlReader: {
root: "CATALOG",
row: "CD",
repeatitems: false
},
onCellSelect: function (rowid, icol, cellcontent, e) {
var rowData = $(this).jqGrid('getRowData', rowid);
rowData.Image = "<img src='css/images/SQl Express 2008.png' />";
$(this).jqGrid('setRowData', rowid, rowData);
},
loadonce: true,
rowNum: 10
});
if you can observer the above code, there are three columns in my grid. The first two columns are populated with the data coming from xml file. and the third column is Image column with static image path. Now, i want to change the image when user clicks on that cell. the above code what i’ve tried is not working. can you please tell me how to do this.
using: vs2010
Thank you.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top