Page 1 of 1

Disabling a Select2 item that's filtered by another dropdown lookup

Posted: 2017-04-07 21:33
by labib saleh
Using Appgini 5.51
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
I need to have a select2 item disabled when the page loads, and I'm using this line in tablename-dv.js file:

Code: Select all

$j('#Sel2-container').select2('enable', false);
It does work fine for Select2 items, BUT when I have it filtered by another dropdown in Appgini application it doesn't work! Any clue why and how to get it to work?

Thnaks,
Labib

Re: Disabling a Select2 item that's filtered by another dropdown lookup

Posted: 2017-04-19 00:25
by labib saleh
Found a solution for this... instead of using the code above I used the readonly property and it worked, not sure why it works this way though :D

Code: Select all

$j('#Sel2-container').prop('readonly', true);