I’m trying to filter a dropdown based on the value selected in another dropdown.
For the most part, I’ve got it, but I cannot get it to just show the DisplayMember instead of the entire dataset. What am I missing?
private void epiUltraComboC3_ValueChanged(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
EpiUltraCombo pmCombo = (EpiUltraCombo)csm.GetNativeControlReference("2483294d-0d7b-4acf-af96-69c66e12902b");
EpiUltraCombo letterCombo = (EpiUltraCombo)csm.GetNativeControlReference("bf59928f-d634-426f-ba68-ca51504c3705");
string letter = letterCombo.Text;
using(var srA = new SalesRepAdapter(this.oTrans))
{
srA.BOConnect();
SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
opts.NamedSearch.WhereClauses.Add("SalesRep",string.Format("RoleCode='PM' AND InActive=0 AND SalesRepCode LIKE '{0}%'",letter));
bool more = false;
DataSet ds = srA.GetRows(opts, out more);
pmCombo.DataSource = ds;
pmCombo.ValueMember = "SalesRepCode";
pmCombo.DisplayMember = "Name";
}
}