chcchb 你好,Spread 本身没有提供 Column TabIndex属性,但是我们可以通过 onkeydown 事件结合 FpSpread1.SetActiveCell() 方法去实现列的 TabIndex,请参考代码:
- <script type="text/javascript">
- window.onload=function() {
- var spread = document.all("FpSpread1");
- if (spread != null) {
- spread.onkeydown = cellChanged;
- }
- }
- function cellChanged() {
- var iActiveCol = FpSpread1.ActiveCol;
- if (event.keyCode == 9) {
- event.returnValue = false;
- event.cancelBubble = true;
- if (iActiveCol < 2) {
- FpSpread1.SetActiveCell(0, 2);
- }
- if (iActiveCol >= 2) {
- FpSpread1.SetActiveCell(0, 4);
- }
- if (iActiveCol==4) {
- FpSpread1.SetActiveCell(0, 2);
- }
- }
- }
- </script>
复制代码 |