2

Is there any custom Style for multiselect picklist ?

I have added bootstrap style sheet for multiselect picklist
But It gives like enter image description here

Visualforce page for above multiselect picklist

LastName


Working Days:

But I wanna Custom style for add and remove button

Thanks in advance
Karthick

1

Eventually you will be able to style every bit of a multiselect picklist - but it might be not as easy as you think.

First, salesforce renders a quite complex custom HTML for the two selects and the buttons. All of it comes along with (again) a bit complex piece of Javascript.

Now interacting with the HTML, CSS and JS is not recommended by Salesforce, since they might change the structure at any time in the future without giving you a notice. As a result, your adaptions may break. But if you can live with that caveat and if you are not afraid to get your hands dirty, you can hack it!

To make it look right, you will have to adjust your CSS manually to play along with generated HTML markup. Just using bootstrap is not enough. I do adaptions usually with jquery along with Firebug to figure out the selectors.

I did this once to make the multipicklist component take 100% of the screen width - not only the few pixels Salesforce is providing for it by default. My issue was, that the component first rendered fine on page load, but messed up later after the first click to add or remove items. It crippled up badly. So be carefull, you may run into traps where you don't expect them. I was able to overcome the rendering issues by overriding some Salesforce JS which is invoked in the event handlers. It ended up to be a bigger hack and it took me an hour or two. But the result was good enough.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.