【发布时间】:2015-05-25 13:06:27
【问题描述】:
我有一个带有一些数字列的网格面板。我有一列将包含其他列的总和。当用户关注 SUM 列时,我想自动设置此值。这是我的代码:
<ext:Column runat="server"
DataIndex="totalth"
Text="TOTAL (T/H)"
Flex="2"
Align="Center">
<Editor>
<ext:NumberField
runat="server"
AllowBlank="false"
AllowDecimals="true"
DecimalPrecision="3"
name="totalth"
Step="0.01">
<Listeners>
<Focus Fn="getSum"></Focus>
</Listeners>
</ext:NumberField>
</Editor>
</ext:Column>
Javascript Fn:
var getSum = function (item) {
item.setValue/*(here is the sum of other two cells in the same row.)*/;
};
如何从其他单元格中获取值?也许在服务器端做更好,我不知道。
【问题讨论】:
标签: javascript asp.net extjs ext.net gridpanel