How to default select top item in drop-down - getCustomCombo

GetCustomcombo defaults to the last item in a list of values selected, I need to have the first item in the list selected:




mygrid.setCellExcellType(<%=iRowFacility%>,2,“coro”);
sList = “<%=sListFacility%>”;
LoadGridCombo(<%=iRowEntity%>,sList);



function LoadGridCombo(iRow, sList)
{
var asValues;

asValues = sList.split("|");
for(i=0; i<asValues.length; i++)
{
	mygrid.getCustomCombo(iRow,2).put(asValues[i],asValues[i]);
}	

}

When user selects the drop down for the first time the ‘selected’ item is the last in the list, I need it to be the first in the list.

Any help appreciated.

Unfortunately your issue is not clear. Options in the combo arranged by the adding order. They can’t be rearranged dynamically. You will have to clear the combo list and fill it with the options again in the needed order