I have an application that I am working on, and need to show/hide controls based on a selected value in a dropdown list. By default most of the controls will be hidden and when a value ("VFD") is selected from the Control Device control, the hidden controls will become visible.
I have an entity name MCCLoads, which has relationships with all of the other entities that drive the dropdown lists.
The screen that i want to apply this functionality to is named MCCLoadsSetListDetail
I was trying to use this bit of code, but I'm not sure if this is the proper way to go
public void MCCLoadsSetListDetail_SelectionChanged()
{
this.FindControl("CTRL_DEVICE").IsEnabled = true;
if (this.MCCLoadsSetListDetail.SelectedItem.Loads_CTRL_Device == "VFD")
{
this.FindControl("Line_Reactor_IMP").IsVisible = false;
}
}
Thanks in advance, Jason