jqgrid editoptions: required not functioning

Posted by benpage on Stack Overflow See other posts from Stack Overflow or by benpage
Published on 2010-05-28T01:07:00Z Indexed on 2010/05/28 1:11 UTC
Read the original article Hit count: 780

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jqgrid