how do i Select highest value in list box as default?
Selecting highest value in list box as default
-
- User
- Posts: 11729
Assume the values in your List Box are derived from a lookup table, then sort the items by using "Order by" and "DESC" from "Lookup Table" pane.
Put this code in "Row_Rendered" server event to hide "Please Select" option, so that the first item will be automatically get selected:
if (CurrentPageID() != "list" && CurrentPageID() != "search") {
array_shift($this->YourFieldName->EditValue); // adjust "YourFieldName" with yours!
}