Ultracombo whereclause doesn't work

Hi experts,

Please check the code below somehow my whereclause doesn’t work here:
private void SearchOnGLAccountAdapterFillDropDown()
{

	bool recSelected;
	string whereClause = "Active = true";
	System.Data.DataSet dsGLAccountAdapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "GLAccountAdapter", out recSelected, false, whereClause);
	if (recSelected)
	{
		// Set EpiUltraCombo Properties
		this.epiUCSelectGL.ValueMember = "GLAccount";
		this.epiUCSelectGL.DataSource = dsGLAccountAdapter;
		this.epiUCSelectGL.DisplayMember = "GLAccount";
		string[] fields = new string[] {
					"GLAccount" ,"AccountDesc"};
		this.epiUCSelectGL.SetColumnFilter(fields);
	}
}

I tried also:

  1. string whereClause = String.Format(“Active= true”);
  2. String.Format(“Active= 1”);

Did you run a trace for this particular search from another screen that calls this? are you positive this is what is sent?
Also, why are you using code, when an EpiCombo will do this same logic without code, just properties?

Hi Jason,

In trace it is taking GLAccount BO but I don’t find the same BOName in epiCombo properties. I checked the db field is Active. which I wants to be true in whereclause

Hi Jason,
I did that things by BAQ Combo but with one issue. I want to show a calculated field in the BAQ Combo but it is not taking it as a display member. Error: Calcualted field is not found as key.

I think you should explore the Combo Props like Jason said.

But just for the record, to filter a UltraCombo its typically something like

// Set EpiUltraCombo Properties
this.comboTCRelatedOp.ValueMember = "ResourceID";
this.comboTCRelatedOp.DataSource = dsResourceAdapter;
this.comboTCRelatedOp.DisplayMember = "ResourceGrpDescription";
string[] fields = new string[] {"ResourceGrpDescription", "ResourceID"};
this.comboTCRelatedOp.SetColumnFilter(fields);

// Custom Values Filtering
UltraGridBand rootBand = this.comboTCRelatedOp.DisplayLayout.Bands[0];
//rootBand.Columns["ResourceID"].Hidden = true; // Make 2nd column invisible
rootBand.ColumnFilters.ClearAllFilters();
rootBand.ColumnFilters["ResourceGrpDescription"].FilterConditions.Add(FilterComparisionOperator.Contains, "Platen");
rootBand.ColumnFilters["ResourceGrpDescription"].FilterConditions.Add(FilterComparisionOperator.Contains, "Preco");
rootBand.ColumnFilters["ResourceGrpDescription"].LogicalOperator = FilterLogicalOperator.Or;

Some folks do it on BeforeDropDown

If the trace is a BO Method with GetList or GetRows, you can hand-type the BO instead.

Jason Woods
http://LinkedIn.com/in/jasoncwoods