Hey guys,
Not sure if this is a bug or if I'm just doing something wrong.
I'm using a multiColumnComboBox with AutoFilter set to true.
- Open the drop-down box (optional, see 3)
- Type some text into the box.
- Open the drop-down box (optiona, either 1 or 3 is same)
- Select an entry with mouse or keyboard - same effect
- Try to type new text into the box.
After step 5, my box is looking up for each individual character I type, and selecting the first entry on each return..
After step 5, if I open the box first and then type, the box will select and close after I hit a single character.
After step 5, if I hit the semicolon, no character will appear in the box - but the fiddly behaviour goes back to normal.
Not sure if this is to do with my code or not. Here's the section where I bind to the multiColumn:
internal void FillDropDowns(bool bRefill) | |
{ | |
string sSuburbText = this.mcboSuburb.Text; | |
// string sTownText = this.cboTown.Text; | |
if (bRefill) | |
{ | |
this.LocationsSentTo.Clear(); | |
this.LocationsSentToTableAdapter.Fill(this.DataSet, "LocationsSentTo"); | |
} | |
this.mcboSuburb.DataSource = this.LocationsSentTo; // This is a wrapper property around the DataSet table referred to above. | |
this.mcboSuburb.DisplayMember = "postCode_prefix"; | |
this.mcboSuburb.ValueMember = "postCode"; | |
RadGridView gridView = this.mcboSuburb.MultiColumnComboBoxElement.EditorControl; | |
GridViewDataColumn prefixColumn = gridView.Columns["postCode_prefix"]; | |
prefixColumn.HeaderText = "Suburb"; | |
prefixColumn.Index = 0; | |
prefixColumn.BestFit(); | |
GridViewDataColumn postCodeColumn = gridView.Columns["postCode"]; | |
postCodeColumn.HeaderText = "PostCode"; | |
postCodeColumn.Index = 1; | |
postCodeColumn.BestFit(); | |
GridViewDataColumn sentToColumn = gridView.Columns["sentTo"]; | |
sentToColumn.HeaderText = "SentTo (D)"; | |
sentToColumn.Index = 2; | |
sentToColumn.IsVisible = Program.DebugMode; | |
sentToColumn.BestFit(); | |
GridViewDataColumn siteIdColumn = gridView.Columns["siteId_fk"]; | |
siteIdColumn.HeaderText = "Site ID (D)"; | |
siteIdColumn.Index = 3; | |
siteIdColumn.IsVisible = Program.DebugMode; | |
siteIdColumn.BestFit(); | |
if (this.mcboSuburb.EditorControl.MasterGridViewTemplate.FilterExpressions[this.mcboSuburb.DisplayMember] == null) | |
{ | |
FilterExpression filter = new FilterExpression( | |
this.mcboSuburb.DisplayMember, FilterExpression.BinaryOperation.AND, | |
GridKnownFunction.Contains, GridFilterCellElement.ParameterName); | |
filter.Parameters.Add(GridFilterCellElement.ParameterName, true); | |
this.mcboSuburb.EditorControl.MasterGridViewTemplate.FilterExpressions.Add(filter); | |
} | |
this.mcboSuburb.SelectedItem = null; | |
this.mcboSuburb.Text = sSuburbText; | |
} |
Note that the FillDropDowns is not being called by any events while the typing or opening is taking place.