Anyone have an idea of how to create computed columns. For e.g. I have a grid like:
$("#myProductGrid").jqGrid({
url:DUMMY_URL,
dataType:"local",
width:285,
colNames:['Item', 'Unit Price', 'Qty', 'Discount', 'Sale Price'],
colModel:[
{name:'description', index:'description', summaryType:'count'},
{name:'unit_price', index:'unit_price', align:"right", sorttype:"float"},
{name:'quantity', index:'quantity', formatter:'number', summaryType:'sum'},
{name:'item_id', index:'item_id', hidden:true},
{name:'discount_percent', index:'discount_percent', align:"right", sorttype:"float"},
{name:'sale_price', index:'sale_price', align:"right", sorttype:"float", summaryType:'sum'},
],
...
});
I would like the "sale price" column to display quantity*(unit_price - (unit_price*discount))
Thanks in advance....