开发者

With edit grid row dialog "Exception thrown and not caught"

The first click on editing a row works great, but after closing the dialog and clicking on another row edit button, it throws an exception (in subject). When debugging I saw in jquery.min.js "#" sign crashes, my guess it somehow gets this invalid character. code:

$("#jqgrid").jqGrid({
        datatype: "local",
        mtype: 'GET',
        colNames: ['Pic', 'Category', 'Order', 'Name', 'Description', 'Full Price', 'Price', 'Is Pack', 'Is Active', 'Is Shipment', 'Is Pack Only', 'Attributes', 'Sites', 'Call Centers', ''],
        colModel: [
                        { name: 'PictureUrl', index: 'PictureUrl', width: 40, formatter: imageFormatter, align: 'center' },
                        { name: 'CategoryID', index: 'CategoryID', width: 60, editable: true, editoptions: { size: 30, value: getProductCategories }, edittype: "select" },
                        { name: '', index: 'ProductID', width: 40, editable: true, editoptions: { size: 30} },
                        { name: 'ProductName', index: 'ProductName', width: 40, editable: true, editoptions: { size: 30} },
                        { name: 'ProductDesription', index: 'ProductDesription', width: 40, editable: true, editoptions: { size: 30} },
                        { name: 'FullPrice', index: 'FullPrice', width: 40 },
                        { name: 'ActualPrice', index: 'ActualPr开发者_JS百科ice', width: 40 },
                        { name: 'IsPackage', index: 'IsPackage', width: 40, editable: true, editoptions: { size: 30, value: "Yes:No" }, edittype: "checkbox" },
                        { name: 'IsActive', index: 'IsActive', width: 40, editable: true, editoptions: { size: 30, value: "Yes:No" }, edittype: "checkbox" },
                        { name: 'IsShipment', index: 'IsShipment', width: 40, editable: true, editoptions: { size: 30, value: "Yes:No" }, edittype: "checkbox" },
                        { name: 'IsPackageOnly', index: 'IsPackageOnly', width: 40, editable: true, editoptions: { size: 30, value: "Yes:No" }, edittype: "checkbox" },
                        { name: '', index: '', width: 40 }, //attributes
                        {name: 'ProductInSites', index: 'ProductInSites', width: 40, editable: true, edittype: "textarea", editoptions: { rows: "2", cols: "35"} },
                        { name: ' ', index: '', width: 40, align: 'center', editable: true, edittype: "textarea", editoptions: { rows: "2", cols: "35"} }, //callcentre
                        { name: ' ', index: '', width: 40, align: 'center', formatter: updatebutton }, //button
                    ],
        rowNum: 20,
        rowList: [10, 20, 30],
        pager: '#jqpager',
        sortname: 'OrderDate',
        viewrecords: true,
        sortorder: "desc",
        caption: "Shipment Report",
        autowidth: true,
        height: "100%",
        loadtext: "Loading...",
        editurl: "ProductsList.ashx?actiontype=3"
    });


You use name: '' and name: ' ' in the definition of some columns in colModel. It is wrong. The name property must be unique name having no blanks or special characters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜