jqgrid sample using array data, what am I missing

后端 未结 8 1627
别跟我提以往
别跟我提以往 2021-01-06 22:43

I\'m new in jqgrid, I\'m just trying thes example to work. I have a html file only, nothing more. When I ran this file, array data is not showing. What am I missing here? Th

8条回答
  •  被撕碎了的回忆
    2021-01-06 23:09

    I think the problem is in the colModel somehow. Check if the script after colModel runs. Take only colModel out and then check again. I'm also having this problem at the moment.

    example:

    jQuery("#appGrid").jqGrid({
        datatype: "local", //or clientSide
        colNames: ["Patient"],
        colModel:[{name:'pat',index:'pat'}]
    });
    
    *some code* <- won't run
    

    No wonder the loop doesn't work if the grid won't let you execute code after.

    But when I do this:

    jQuery("#appGrid").jqGrid({
        datatype: "local", //or clientSide
        colNames: ["Patient"]
    });
    
    *some code* <- will run after col error message
    

    The Grid builds just fine, but the code after it isn't executed at all. I don't know where the error is.

提交回复
热议问题