You need to sign in to do that
Don't have an account?
Harikrishna Mandadapu
how to align multiselect picklist fields in visualforce page
I am using the below Jquery snippet to allign. It is looking good, but after I select any value alignment is getting disturbed. Can anyone help me out of this.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(function() {
setTimeout(function() {
$j('select.myMultiClass').each(function(i, val) {
$j(val).width(100);
$j(val).height(150);
})
},100);
});
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(function() {
setTimeout(function() {
$j('select.myMultiClass').each(function(i, val) {
$j(val).width(100);
$j(val).height(150);
})
},100);
});
</script>
Please refer to the screenshots after loading the page and adding a value from the picklist.
Thats is the standard behaviour of that binding inputField for Multipicklist, i dont think you can change it via CSS, or Style else if you wanna really change the you have to write your own component with out inputField binding. you have to use it in you VF page,
Follow the link below for creating component and use it in your VF page,
https://hisrinu.wordpress.com/2011/05/30/custom-multi-select-picklist-field-in-visualforce/ (without having component).
http://sfdcintegration.blogspot.in/2015/08/multiselect-picklist-in-visualforce-page.html ( with component)
Hope it will help you,
Mark it solved if its helps you.
Thanks
karthik