That all looks fine, do you now if there are results in your QueryResult table?
Run
MessageBox.Show(dqa.QueryResults.Tables[“Results”].Rows.Count());
on line 279
Oh wai… I didn’t look at the code carefully…
You are assigning the columns to the grid… not the value. Try this
epiComboC2.DataSource = dqa.eryQuResults.Tables["Results"];
epiComboC2.ValueMember = "UD102A_ChildKey1";
epiComboC2.DisplayMember = "UD102A_Character01";
When i try that code, the combo box get grayed out. Should i use an Ultra ComboBox?
In the ComoBox Box properties set False to Retrieve on Activate.
Thanks so much it works gratefully
Running into the same thing with a BAQCombo.. works perfectly but doesn’t refresh the display when switching between multiple customers in Customer Entry.
I am too stubborn to reimplement the whole thing with an EpiCombo… Any ideas for force refreshing the BAQCombo? Oddly I don’t even see BAQCombo in the Object Explorer so I’m not sure what methods I can use to attack it..
There is a ForceRefresh call you can make on the combo itself
Something like refresh list it’s been a minute
using System.Reflection;
public void InitializeCustomCode()
{
myCombo= (BAQCombo)csm.GetNativeControlReference( "42dd2f96-d122-4e38-a745-2cce674154c7" );
myCombo.BeforeDropDown += new System.ComponentModel.CancelEventHandler( this .myCombo_BeforeDropDown);
}
public void DestroyCustomCode()
{
myCombo.BeforeDropDown -= new System.ComponentModel.CancelEventHandler( this .myCombo_BeforeDropDown);
}
private void myCombo_BeforeDropDown( object sender, System.ComponentModel.CancelEventArgs args)
{
// ** Place Event Handling Code Here **
RedfreshBAQCombo(myCombo);
}
private void RedfreshBAQCombo(BAQCombo cbo)
{
var field = cbo.GetType().GetField( "_baqResults" , BindingFlags.NonPublic | BindingFlags.Instance);
field.SetValue(cbo, null );
var method = cbo.GetType().GetMethod( "LoadBaqList" , BindingFlags.NonPublic | BindingFlags.Instance);
method.Invoke(cbo, null );
cbo.RetrieveOnActivate = true ;
cbo.ForceRefreshList();
}
Omg that worked. Thank you! I was literally going down the path of sending mouse clicks to click the dropdown and then tab off… thank you for saving me from that.
