jgrid async false does not work

314 Views Asked by At

jgrid have problem with async:false property

$("#mygrid").jqGrid({

.... ajaxGridOptions : {async:false,.....} // ... });

i set but it does not work...so it works such as accordion ... firstly it loads as this screen first

after mseconds it get this style ... for this bug i try async:false but it does not work it still begins with first screen and then get the second screen form

for viewing source here is demo:click deo

enter image description here

1

There are 1 best solutions below

0
On

First of all I would recommend you update jqGrid which you use to 4.6.0 from the retro version 4.3.1. I would recommend you to look in the answer which uses Multiselect and jqGrid 4.6.0.

Seconds I suppose that you can fix your problem in the following way. You use currently

stype: 'select',
searchoptions: {
    sopt: ['eq', 'ne'],
    value: 'Admin:Admin;Moderator:Moderator;Yazar:Yazar;Editor:Editor',
    attr: { multiple: 'multiple', size: 10 },
    dataInit: dataInitMultiselect
}

Where the code of dataInitMultiselect seems to come from my old answer. The code contains the line $elem.multiselect(options); which convert <select> with multiple="multiple" size="10" attributes to multiselect control. I suggest that you

  1. remove attr: { multiple: 'multiple', size: 10 }
  2. add the following lines before the line $elem.multiselect(options);
$elem.attr({multiple: "multiple", size: 14});
$elem.find("option").removeAttr("selected");