EasyUI Forum
May 21, 2024, 01:20:12 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Datalist Background Color  (Read 4752 times)
jmansur
Newbie
*
Posts: 31


View Profile
« on: March 17, 2016, 07:45:09 AM »

PROBLEM:

I have one datalist. And when the DataList is loaded I execute this code $('#dlDivision').datalist('checkAll'), and all options have a yellow background color .

I don't want yellow background color appears ever.

If I check one by one, each option appears checked , and with the white background color.

I need the datalist always have white background color.

How should I do ?


MY CODE:
   function getDivisiones() {
      $('#dlDivision').datalist({
         url: 'Ajax/GmapsFiltrosDivisiones.asp',
                     method: 'get',
         textField:'Nombre',
         valueField: 'Codigo',
                    singleSelect: false,
         onBeforeSelect: function(){return false;},
         checkbox: true,
         lines:false,
         onLoadSuccess: function(data) {
                               $('#dlDivision').datalist('checkAll');
         }         
      });
   }

   $( document ).ready(  
      function(){  getDivisiones();        }
   );

Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: March 17, 2016, 08:15:25 AM »

Just need to set 'selectOnCheck' to false.
Code:
$('#dl').datalist({
checkbox: true,
selectOnCheck: false,
onBeforeSelect: function(){return false;},
onLoadSuccess:function(){
$(this).datalist('checkAll')
}
})
Logged
jmansur
Newbie
*
Posts: 31


View Profile
« Reply #2 on: March 17, 2016, 08:42:15 AM »

thanksssss.

Very simple.

Regardsssssssssssssssssss
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!