如何在jqgrid中的另一列中获取一列的格式化值

时间:2013-06-24 09:59:46

标签: jqgrid jqgrid-formatter

如何在jqgrid中的另一列中获取一列的格式化值。

例如:

{ name: 'amount', index: 'amount', sorttype: "float", formatter: processAmount, title: false },
{ name: 'netAmount', index: 'netAmount', sorttype: "float", formatter: function (cellvalue, options, rowObject) 
{
     // How do I get the formatted value of column "amount" here?
} 
}

我知道我发布的要求或代码很少。但我希望这已经足够了。如果您需要更多信息,请告诉我。

谢谢, 萨姆

1 个答案:

答案 0 :(得分:0)

在将网格主体放置在页面上之前,将调用自定义格式化程序。因此,您无法访问另一列的自定义格式化程序中的一列的格式化值。您仍然可以做的是调用另一个格式化文件。例如,您可以在processAmount列的格式化程序中调用netAmount函数。

相关问题