LLBLGEN 3.0
I have two comboboxes menu sub group and menu group which I am populating using typedlist as per below code. works absolutely fine and I got this easily
var adapter = new DataAccessAdapter(); IRelationPredicateBucket filter = menugroupsubgroup.GetRelationInfo(); filter.PredicateExpression.Add(MenusubgroupFields.Flag == StandardFlag.recordvalidflag); filter.Relations.Add(MenusubgroupEntity.Relations.MenugroupEntityUsingMenugroupId); ISortExpression sorter = new SortExpression(MenusubgroupFields.Description | SortOperator.Ascending); adapter.FetchTypedList(menugroupsubgroup.GetFieldsInfo(), menugroupsubgroup, filter,0, sorter,false); cmbmenusubgroupid.DataSource = menugroupsubgroup; cmbmenusubgroupid.ValueMember = "MENUSUBGROUPID"; cmbmenusubgroupid.DisplayMember = "MENUSUBGROUPDESCRIPTION"; cmbmenusubgroupid.SelectedIndex = -1;
cmbmenugroupid.BindingContext = new BindingContext();
cmbmenugroupid.DataSource = menugroupsubgroup;
cmbmenugroupid.ValueMember = "MENUGROUPID";
cmbmenugroupid.DisplayMember = "MENUGROUPDESCRIPTION";
cmbmenugroupid.SelectedIndex = -1;
Now, When I select menu subgroup from combobox, corresponding menu group does not appear in menu group combo box. Any thing extra to be done ? I mean menugroup related to selected subgroup only to be displayed