以表格形式使行只读 [英] Making a row read only in a tabular form

查看:90
本文介绍了以表格形式使行只读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表格表格,用户将每年针对其目标进行更新.每个产品将具有三行:显示销售(去年)的行,显示sales_target(销售人员将进入的行)和经理数据(经理期望销售人员应该销售的行)的行.用户应该只能查看去年的销售额和经理的数字,并且可以输入sales_targets.我知道如何使列可读,但是如果行不是经理的身材和销售额,我会停留在如何使行可读的问题上.

I have a tabular form which users will update on a yearly basis for their targets. Each product will have three rows: a row showing sales (last year), a row showing sales_target (sales man will enter) and a manager figure (what the manager expects the sales man should sell). The user should only be able to view sales from last year and the managers figure, and be able to enter into sales_targets. I know how to make columns readable but stuck on how to make a row readable if its not manager figure and sales.

有一些我可以从另一篇文章中使用的javascript,但是它用于列而不是行,可以使用类似的东西吗? 在此处链接

There was some javascript that i could maybe use from another post however that is for a column rather than a row, could something similiar maybe used? Link here

我在这里做了一个演示:

I have made a demo here:

链接: apex.oracle.com
工作区:apps2
用户:user
密码:DynamicAction2
应用程序名称:应用程序71656表格形式的只读行

Link:apex.oracle.com
workspace: apps2
user: user
password: DynamicAction2
application name: Application 71656 Read only Rows for Tabular Form

推荐答案

是的,可以使用类似的方法(在页面加载时执行此操作):

Yes, something similar can be used (execute this on page load):

$('#TAB_REP').find('td[headers="TYPE"]:contains(manager figure)').siblings('td').children('input').attr('disabled', 'disabled');

其中TAB_REP是报告的静态ID.

where TAB_REP is static ID of your report.

我尝试使用更简单的方法-通过定义列的属性,但是在表格报表中,顶点不替换#COLUMN#字符串.希望这不是一个错误.

I have try to use more simple way - by defining attribute of the column, but in tabular report, apex dosn't replace #COLUMN# strings. Hope this is not a bug.

P.S.我已经更改了您的演示.

P.S. I've changed your demo.

这篇关于以表格形式使行只读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆