function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
satishch_sfdcsatishch_sfdc 

System.TypeException: Invalid conversion from runtime type String to List<System.SelectOption>

Hi,

I have a selectlist (dropdown list) with color code, when i select one option from this colorcode list through onchange event, i am getting the below exception

System.TypeException: Invalid conversion from runtime type String to List<System.SelectOption>

please help me, thanks in advance

Thanks,
Satish
Pankaj_GanwaniPankaj_Ganwani
Hi,

Can you please share your code with us if possible so that we can investigate the area of error?
Ravi NarayananRavi Narayanan
<apex:selectlis value="{!somevalue}">. it should be public string somevalue{Get;set;} in your apex class
check if you declared this somevalue as a string in ur controller.