ComboBox stays open after Select Direct Event
Any help would be appreciated. The ComboBox looks as though it's collapsed, but if I roll over it without opening another ComboBox it opens again and fires Page_Load (originally I had it selecting the first element there, but had to take that out as rolling over the ComboBox again would reset the value and call select, changing the values in my Departments combo). I'm guessing that I just need one call for the event handler, but I have no idea what that one call would be.
The handler will eventually just apply a filter to DptStore but I haven't looked in to that enough yet to figure out how to get it working properly.
Code:
<ext:ComboBox ID="FacCombo" runat="server" StoreID="FacStore" allowBlank="false" Name="fac" DisplayField="facility1" ValueField="facility_no" Editable="false" FieldLabel="Facility" ForceSelection="True" AnchorHorizontal="100%" >
<DirectEvents>
<Select OnEvent="updateDepartments" />
</DirectEvents>
</ext:ComboBox>
The C# code in the code-behind is:
Code:
protected void updateDepartments(object sender, DirectEventArgs e)
{
DataDataContext db = new DataDataContext();
String fac_no = FacCombo.SelectedItem.Value;
var dpt = from d in db.departments
where (d.facility_no.ToString().Equals(fac_no))
select d;
this.DptStore.LoadData(dpt.ToList());
this.DptStore.DataBind();
}