找回密码
 立即注册

QQ登录

只需一步,快速开始

iceman
社区贡献组   /  发表于:2012-3-29 16:58:00
21#

回复 20# xuewuhen0110 的帖子

xuewuhen0110 你好,

1. Spread 在 MVC2 的 Demo 可以参考 7# 附件,遇到具体问题可以提出来,我们共同解决。

2.请问楼主使用 Spread 的版本是? Spread for .NET 6.0.3505.2008 对 MVC3 有较好的支持。
回复 使用道具 举报
xuewuhen0110
中级会员   /  发表于:2012-4-5 10:42:00
22#

回复 18# iceman 的帖子

<table id="FpSpreadAdd_viewport" cellspacing="0" cellpadding="0" rules="all" bordercolor="#D0D7E5" cols="12" style="border-top-color: rgb(208, 215, 229); border-left-color: rgb(208, 215, 229); border-top-width: 0px; border-left-width: 0px; border-collapse: collapse; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(208, 215, 229); border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(208, 215, 229); table-layout: fixed; width: 1px; cursor: default; top: 0px; ">
                        <colgroup><col width="90px" id="FpSpreadAddcol0v" index="0" fpcol="0"><col width="90px" id="FpSpreadAddcol1v" index="1" fpcol="1"><col width="90px" id="FpSpreadAddcol2v" index="2" fpcol="2"><col width="90px" id="FpSpreadAddcol3v" index="3" fpcol="3"><col width="90px" id="FpSpreadAddcol4v" index="4" fpcol="4"><col width="90px" id="FpSpreadAddcol5v" index="5" fpcol="5"><col width="90px" id="FpSpreadAddcol6v" index="6" fpcol="6"><col width="90px" id="FpSpreadAddcol7v" index="7" fpcol="7"><col width="90px" id="FpSpreadAddcol8v" index="8" fpcol="8"><col width="90px" id="FpSpreadAddcol9v" index="9" fpcol="9"><col width="90px" id="FpSpreadAddcol10v" index="10" fpcol="10"><col width="89px" id="FpSpreadAddcol11v" index="11" fpcol="11"></colgroup><tbody><tr fpspread="r" fpkey="0" style="height: 24px; ">
                                <td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow-x: hidden; overflow-y: hidden; height: 23px; background-color: rgb(245, 247, 250); background-image: url(about:blank); " width="90" bgcolorbak="rgba(0, 0, 0, 0)" paintselected="true">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td>
                        </tr><tr fpspread="r" fpkey="1" style="height:22px;">
                                <td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow-x: hidden; overflow-y: hidden; height: 23px; ">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td>
                        </tr><tr fpspread="r" fpkey="2" style="height:22px;">
                                <td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow-x: hidden; overflow-y: hidden; height: 23px; ">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td>
                        </tr><tr fpspread="r" fpkey="3" style="height:22px;">
                                <td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow-x: hidden; overflow-y: hidden; height: 23px; ">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td>
                        </tr><tr fpspread="r" fpkey="4" style="height:22px;">
                                <td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow-x: hidden; overflow-y: hidden; height: 23px; ">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td>
                        </tr><tr fpspread="r" fpkey="5" style="height:22px;">
                                <td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow-x: hidden; overflow-y: hidden; height: 23px; ">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td>
                        </tr><tr fpspread="r" fpkey="6" style="height:22px;">
                                <td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow-x: hidden; overflow-y: hidden; height: 23px; ">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td>
                        </tr><tr fpspread="r" fpkey="7" style="height:22px;">
                                <td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow-x: hidden; overflow-y: hidden; height: 23px; ">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td>
                        </tr><tr fpspread="r" fpkey="8" style="height:22px;">
                                <td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow-x: hidden; overflow-y: hidden; height: 23px; ">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td>
                        </tr><tr fpspread="r" fpkey="9" style="height:22px;">
                                <td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow-x: hidden; overflow-y: hidden; height: 23px; ">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td><td class="s0s2s0" fpcelltype="GeneralCellType" style="overflow:hidden;">&amp;nbsp;</td>
                        </tr>
                </tbody></table>

如何获取row和column的数量?我已用js取得当前页面中的tabale
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2012-4-5 10:50:00
23#

回复 22# xuewuhen0110 的帖子

xuewuhen0110 你好,
Spread 提供客户端方法:GetRowCountGetColCount 可分别获取 行、列数,详细用法可以参考帮助文档,内有详细说明、示例代码。
回复 使用道具 举报
xuewuhen0110
中级会员   /  发表于:2012-4-5 11:06:00
24#

回复 23# iceman 的帖子

我是在前台页面用js取值,后台的写法我知道的
var g = document.all.FpSpreadAdd_viewport;
如何取得g对象中的rowscount喝colcount?
回复 使用道具 举报
xuewuhen0110
中级会员   /  发表于:2012-4-5 11:11:00
25#

11

QQ截图20120405110825.png (74.24 KB, 下载次数: 442)
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2012-4-5 11:13:00
26#

回复 24# xuewuhen0110 的帖子

xuewuhen0110 你好,不好意思,我没有表达清楚,
1.我们不需要通过获取 Table 进而取得行列数,可以直接在 Spread 上进行操作,下面是参考代码:

  1.     <script type="text/javascript">
  2.         function getRowColCount() {
  3.             var spread = document.getElementById("FpSpread1");
  4.             var rowcount = spread.GetRowCount();
  5.             var colcount = spread.GetColCount();
  6.         }
  7.     </script>
复制代码
2.为了方便用户使用,Spread 提供了大量的前台属性、方法,在帮助文档中的位置为:Client-Side Scripting Reference,相信会对楼主有帮助。
回复 使用道具 举报
study1990
金牌服务用户   /  发表于:2012-4-5 14:56:00
27#

回复 26# iceman 的帖子

Spread中对单元格遍历时是行优先还是列优先?
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2012-4-5 16:38:00
28#

回复 27# study1990 的帖子

study1990  你好,Spread中对单元格遍历时是行优先还是列优先? 请问该问题具体是要实现什么功能呢?
回复 使用道具 举报
study1990
金牌服务用户   /  发表于:2012-4-6 08:25:00
29#

回复 28# iceman 的帖子

对所选单元格区域加上边框,我看哪个更快一下,excel是列优先的,不知Spread是什么样的
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2012-4-6 09:32:00
30#

回复 29# study1990 的帖子

study1990 你好,
经过测试,先遍历行速度更快。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部