0

如何在 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?
} 
}

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

谢谢,山姆

4

1 回答 1

0

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

于 2013-06-24T10:57:59.133 回答