那个回车响应能不能给出一个代码?我现在样设置了,没反应
客户端脚本
<script type="text/javascript">
function setMap() {
var ss = document.getElementById("FpSpread1");
alert("测试");
if (ss != null){
//IE9 or earlier
//ss.AddKeyMap(13,true,true,false,"this.MoveToLastColumn()");
ss.AddKeyMap(13,true,true,false,"element.MoveToLastColumn()");
}
</script>
window.onload = function() {
var spread1 = document.getElementById("FpSpread1");
spread1.AddKeyMap(13, false, false, false, function() { var ss = spread1; ss.MoveToLastColumn(); });
}
FarPoint Spread在哪一个事件中设置
我目前是在ActiveCellChange里面设置的,没反应,在表格中回车直接就刷新页面了
<FarPoint:FpSpread ID="FpSpread1" runat="server" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" style="z-index: 1; left: 10px; top: 93px; position: absolute; height: 332px; width: 932px">
<commandbar backcolor="Control" buttonfacecolor="Control" buttonhighlightcolor="ControlLightLight" buttonshadowcolor="ControlDark">
<Background BackgroundImageUrl="SPREADCLIENTPATH:/img/cbbg.gif"></Background>
</commandbar>
<sheets>
<FarPoint:SheetView SheetName="Sheet1">
</FarPoint:SheetView>
</sheets>
<ClientEvents ActiveCellChanged="setMap" />
<TitleInfo BackColor="#E7EFF7" ForeColor="" HorizontalAlign="Center" VerticalAlign="NotSet" Font-Size="X-Large"></TitleInfo>
</FarPoint:FpSpread>
|