private DataModel.EntityAttr countryAttr = null; public MainForm() { // // Required for Windows Form Designer support // InitializeComponent(); . . . . . . . //somewhere at the form start countryAttr = model.EntityRoot.FindAttribute(EntAttrProp.SqlName, "Customers.Country"); } //each time user updates the condition with monitored attribute, //we refresh all lists that depends on it private void query_ConditionsChanged(object sender, ConditionsChangeEventArgs e) { if (e.Condition.BaseAttr != null && e.Condition.BaseAttr == countryAttr) { QPanel.RefreshList("RegionList"); } } private void QPanel_ListRequest(object sender, ListRequestEventArgs e) { if (e.ListName == "RegionList") { e.ListItems.Clear(); string country = query.GetOneValueForAttr(countryAttr); if (country == "Canada") { e.ListItems.Add("British Columbia", "BC"); e.ListItems.Add("Quebec", "Quebec"); } else if (country == "USA") { e.ListItems.Add("California", "CA"); e.ListItems.Add("Colorado", "CO"); e.ListItems.Add("Oregon", "OR"); e.ListItems.Add("Washington", "WA"); } }