I iterate through a list of items, and need to show a specific dropdown list if the state of element is equal to student or teacher. The following code shows all fields but
You don't need to have those conditions and if
tag at all if you need to have the select
tag being preselected on the Status
you should provide valid keys. The headerKey = "-1"
is invalid because it's not a String
. Try headerKey = " "
, the keys should not be empty. if the preselected value doesn't match the key the headerValue
will be shown. For example