如何禁用嵌套网格视图中的记录? [英] How to disable records inside a nested grid view?

查看:48
本文介绍了如何禁用嵌套网格视图中的记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好:)



我有一个使用嵌套网格视图的项目。部分要求是我将显示用户添加的里程碑,核对表和活动。首先,用户将输入数字(合同号)并将搜索数据库(如果存在)。如果是,它将显示具有该合同号的该人的姓名。如果用户选择里程碑名称,他/她将按添加核对表按钮并选择该里程碑下的核对表。但在清单中,有两种类型 - 标准和非标准。在每个清单中,它包含活动。活动分为可重复和不可重复。现在,这里的规则是,如果用户选择标准清单(在复选框列表中),则可以选择所有可重复的活动,并且禁用所有不可重复的清单。如果用户选择非标准清单(复选框列表控件),则他/她无法选择所有活动。他/她只能检查一项活动。最后,如果用户再次选择他/她添加的现有清单,则只能选择可重复的活动。不可重复的活动被禁用。我试过的是添加用户选择的所有活动和清单,并将其放在网格视图中。但我不能或者我应该说我不知道​​如何禁用规则中的记录。

任何人都可以帮助我吗?

Hello :)

I have a project that uses a nested grid view. Part of the requirements is that I will display the milestone, checklist and activity added by the user. At first, The user will input numbers(Contract Number) and will search to the database if it exist. If it is,it will display the name of that person with that contract number. if the user selects a milestone name, s/he will press the Add checklist button and will select the checklist under that milestone. but in checklist, there are two types- the standard and non standard. in each checklist it contains activity. activity is categorized as repeatable and non repeatable. Now, the rule here is that, if the user selects a Standard Checklist(in a from of check box list),all repeatable activities can be selected and the non repeatable checklist were all disabled. if the user selects Non Standard Checklist(Check box list control), s/he cannot select all the activities. Only one activity can s/he checks. and lastly, if the user selects again the existing checklist that s/he add, only the repeatable activities can be selected. the non repeatable activities are disabled. What I have tried is adding all the activities and checklist that the user selects and put it inside the grid view. But I cannot or I should say i do not exactly know on how to disable the records that are in the rules.
Can anyone help me?

推荐答案

首先,确定您将禁用记录的事件,这意味着我想禁用该行上的复选框。



现在,如果event是一个GridView事件,然后你可以轻松找到当前行并启用/禁用其中的复选框。



如果这是一个控制事件,那么你必须循环遍历GridView记录,然后在循环中逐个启用/禁用它们。
First of all, identify the Event in which you will be disabling the records that means I guess disabling the checkbox on the row.

Now, if the event is a GridView Event, then you can easily find the current row and enable/disable the checkbox inside that.

If that is a Control Event, then you have to loop through the GridView records to get then in a loop and enable/disable them one by one.


这篇关于如何禁用嵌套网格视图中的记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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