views:

1024

answers:

1

This is strange and any alternative method to what I want to accomplish is welcome. My app uses the jqgrid 3.5.3 and I need to disable a select list on my edit form. When I do so using the code displayed below it breaks the edit form - meaning I can not cancel or submit it. Thanks. This code is in the edit options array of the navGrid method. The the dropdown is the 'serv_descr' field. The others are text boxes and don't pose a problem. The form does come up and the field is disabled - its just broken.

beforeShowForm: function(eparams) {

         document.getElementById('equip_id').disabled = true;
         document.getElementById('service_dt').disabled = true;
         document.getElementById('serv_descr').disabled = true;
         document.getElementById('calc_next_svc').checked = 'true';
     }
A: 
afterShowForm: function(eparams) {

  $('#equip_id').attr('disabled', 'disabled');
  $('#service_dt').attr('disabled', 'disabled');
  $('#serv_descr').attr('disabled', 'disabled');
  $('#calc_next_svc').attr('checked', true);

}

Note: replace event trigger afterShowForm id name must be form controll

jmav
More on this- on first showing of the form the dropdown is enabled. Itakes a second to populate the dropdown with values. Then is I close the form and open it again for the same record the dropdown is disabled. Its like I need to disable it after afinal event. Any thoughts?
MikeD