X765321 你好,
行内的 Table id 为 viewport,可以分别设置 viewport 和 FpSpread1 的 ondblclick 事件,同时在前台通过逻辑判断事件触发区域:
- protected override void Render(HtmlTextWriter writer)
- {
- Table viewport = this.FpSpread1.FindControl("viewport") as Table;
- viewport.Attributes.Add("ondblclick", "doubleclick('行内')");
- this.FpSpread1.Attributes.Add("ondblclick", "doubleclick('行外')");
- base.Render(writer);
- }
复制代码
- <script type="text/javascript">
- var flag = 0;
- function doubleclick(test) {
- if (test == '行内') {
- alert('行内');
- flag = 1;
- return;
- }
- else if (flag!=1) {
- alert("行外");
- }
- flag = 0;
- }
- </script>
复制代码 |