If I understand you correctly, I'm not sure why you need to search through controls or cast anything.
Control1
is an entity which creates an AutoComplete Box (dropdown list). That selection is copied into a local property in the Control1_Changed
method. That property is used as a parameter in a filter query to create Control2
.
C#:
private void Control1_Changed()
{
this.MyLocalProperty = this.Control1.SelectedItem;
}
VB.NET:
Private Sub Control1_Changed()
Me.MyLocalProperty = Me.Control1.SelectedItem
End Sub
Just make sure you have Auto Execute Query checked in Control2
's Properties and the second control should update and filter when Control1
changes the query parameter.
The code in my screen shots all takes place inside of Yann's Modal Helper so there is nothing special you need to do.