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

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
labib saleh
Posts: 18
Joined: 2014-12-29 21:46

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

Post by labib saleh » 2017-04-07 21:33

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

labib saleh
Posts: 18
Joined: 2014-12-29 21:46

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

Post by labib saleh » 2017-04-19 00:25

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);

Post Reply