With edittype select and multiple true, select box is not loading data

前端 未结 1 918
青春惊慌失措
青春惊慌失措 2020-12-21 13:03

I have select box in jqGrid and to load data m using dataUrl. Everything is working fine but when I put multiple as true then data is

相关标签:
1条回答
  • 2020-12-21 13:45

    You have a part of problems (jqGrid bugs) which I described in the answer and which I posted as the bug report to the developer of jqGrid. The bugs are still not fixed so you my attempts to reproduces your problem in Internet Explorer the demo:

    enter image description here

    I used IE9 for the test. If you fix the line 8217 of the jquery.jqGrid.src.js (version 4.1.2) from

    if(cm[i].edittype == "select" && cm[i].editoptions.multiple===true && $.browser.msie) {
    

    to

    if(cm[i].edittype === "select" && typeof(cm[i].editoptions)!=="undefined" && cm[i].editoptions.multiple===true && typeof(cm[i].editoptions.dataUrl)==="undefined" && $.browser.msie) {
    

    the problem will be fixed and you will have

    enter image description here

    (See the same demo, but which use the fixed jquery.jqGrid.src.js).

    Moreover I wrote you in the comment that the attempt generate unique URL used in dataUrl with

    dataUrl: 'PopulatePrimarySkillData.do?nd=' + Math.random()
    

    generate one url like

    PopulatePrimarySkillData.do?nd=0.30184902572188804 
    

    If you would use dataUrl: 'PopulatePrimarySkillData.do and will use additional parameter ajaxSelectOptions: { cache: false } the dataUrl which will be used will be really unique like

    PopulatePrimarySkillData.do?_=1312564872215
    PopulatePrimarySkillData.do?_=1312564872217 
    PopulatePrimarySkillData.do?_=1312564891288
    ...
    
    0 讨论(0)
提交回复
热议问题