ok not sure what i'm doing wrong here:
            $("#list").jqGrid({
            url: --URL--,
            datatype: 'json',
            mtype: 'GET',
            colModel: [
           开发者_运维问答   { label: 'Index', index: 'Index', key: true, hidden: true },
              { label: 'SampleSize', index: 'SampleSize', editable: true, editrules: { required: true, number: true} },
            ],
            pager: '#pager',
            rowNum: 10,
            rowList: [10, 20, 30],
            viewrecords: true,
            height: 'auto',
            width: 'auto',
            editurl: '.',
            createurl: '.',
            deleteurl: '.'
        });
        $('#list').jqGrid('navGrid', '#pager',
            { edit: true, add: true, del: true, search: false },
            { url: '#' }, // edit options
            {url: '#' }, // add options
            {url: '#' }, // delete options
            {}, // search options
            {}
        );
when editing / creating a record, i can keep the textbox for 'samplesize' empty and jqgrid does not throw any kind of error. am i forgetting to add something in?
ok found out the problem - i didn't have the 'name' parameter in the colModel:
        $("#list").jqGrid({
        url: --URL--,
        datatype: 'json',
        mtype: 'GET',
        colModel: [
          { label: 'Index', index: 'Index', key: true, hidden: true },
          { name: 'SampleSize', label: 'SampleSize', index: 'SampleSize', editable: true, editrules: { required: true, number: true}
easy fix when you know how...
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论