I searched for a solution but found varied incomplete answers, so sorry if this was somewhere blatantly obvious.
I’m populating a dropdown with employees and displaying the employee name but storing the employee id. The data is coming back not sorted by the visible name and likely by the ID. Is there a way to sort the data directly in the method call? I’ve used the whereClause to filter my results, hoping there’s a quick way of adding the sort there as well.
Call is below.
private void SearchOnPREmployeeAdapterFillDropDown()
{
bool recSelected;
string whereClause = string.Empty;
whereClause = String.Format("ExpenseCode = '1400'");
System.Data.DataSet dsPREmployeeAdapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "PREmployeeAdapter", out recSelected, false, whereClause);
if (recSelected)
{
// Set EpiUltraCombo Properties
this.epiUltraComboC1.ValueMember = "EmpID";
this.epiUltraComboC1.DataSource = dsPREmployeeAdapter;
this.epiUltraComboC1.DisplayMember = "Name";
string[] fields = new string[] {
"Name"};
this.epiUltraComboC1.SetColumnFilter(fields);
}
}