You need to sign in to do that
Don't have an account?
Rick Roll
N>Help Auto Selecting Selectlist Value based on Co-Row Value
Hello everyone.
I have a pageblocktable with 3 rows that are dynamically produced from an object Sample__c
As you can see Column3 contains a selectlist with values from Colu1__c which is also listed on column 2 of the table
My problem is when I load the page, the values on the picklist are all set to --Select-- but I wanted each of them to automatically choose its corresponding column 2 value (as selected)as default when I load the page.
ex. if the column 2 of the table has Very Good, its corresponding selectlist column should make Very Good as selected value
Can someone please tell me how to do this?
I have a pageblocktable with 3 rows that are dynamically produced from an object Sample__c
As you can see Column3 contains a selectlist with values from Colu1__c which is also listed on column 2 of the table
My problem is when I load the page, the values on the picklist are all set to --Select-- but I wanted each of them to automatically choose its corresponding column 2 value (as selected)as default when I load the page.
ex. if the column 2 of the table has Very Good, its corresponding selectlist column should make Very Good as selected value
Can someone please tell me how to do this?
Hello,
You need to enter Status(Coul1__c) field in value attribute of <Apex:SelectList> of third column.
For more information, can you please give page and controller code?
Thanks & Cheers,
Jigar (pateljb90@gmail.com)
I think your problem can be solved by initializing the select list value in your constructor with the values which you are displaying in column2(Status).
Ex : So in this example you can whic ever value is intialized in the constructor then that value will be visible in the select list.
please mark as best if it helps for you.