屏幕打开时是否可以更改不可见? [英] Can I change isvisible while a screen is open?

查看:109
本文介绍了屏幕打开时是否可以更改不可见?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有点复杂的屏幕,用于3种不同类型的订单.这3种订单类型共同共享大多数字段,但是每种订单类型都有一些唯一的文件. 我想显示所有常见的文件,但隐藏唯一字段,直到用户首先从列表中选择类型.一旦做出选择(从下拉列表中),我希望与订单关联的唯一字段类型即可显示.  

I have a somewhat complex screen that is used for 3 different types of orders.  The 3 order types all share most of the fields in common but there are a few fileds that are unique to each order type.  On a new entry I would like to display all the common fileds but hide the unique fields until the user first selects the type from a list.  Once the selction is made (from a drop-down) I want the unique fields associated with the order type to become visible.  

我已经在ScreenCreated方法中将每个唯一字段设置为不可见...我的问题是我现在如何根据订单类型的选择(基本上是简单的1、2或3).

I have already set each of the unique fields to notvisible in the ScreenCreated method... my question is how do I now prgrammatically change the novisible to isvisible based on the selection of the order type (basically a simple 1, 2 or 3).

谢谢

推荐答案

您使用"FindControl"引用控件.

You use "FindControl" to reference the controls.

我在带有下一步"的简单向导中使用以下代码:和上一个"按钮:

I use the following code in a simple wizard with "Next" and "Previous" buttons:

this.FindControl("Tab_SelectDataSet").IsVisible = false;
this.FindControl("Tab_CashFlowBarChartCFOnly").IsVisible = true;
this.FindControl("Tab_CashFlowBarChartCFOnly").Focus();

标记


这篇关于屏幕打开时是否可以更改不可见?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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