1

我是 Jqgrid 的新手。我不知道如何在 jqgrid 中上传任何格式的多个文件。我搜索了在 google 中找不到任何内容的示例。如何上传任何格式的多个文件真的很有帮助。谢谢您的帮助..!

function initjqgridfileupload(table,pager,msg,loadSelID,caption,chkMrk,del ){

     $(table).empty();
     $(table).GridUnload();

    var woid = $("#ID").val();
     var mygrid =jQuery(table).jqGrid({
        datatype: "local",
        height:25,
        data:msg,   
        width: 750,
        scrollOffset:0,
        //autowidth: true,
        colNames:['Id','File','File Name'],
        colModel:[
            {name:'id',index:'id',hidden: true , width:20,sorttype:"int",resizable:false},
            {name:'fileName', width:150,align:"left",hidden: true ,resizable:false,edittype:'select', formatter:'FilesLinks'},
            {name:'originalFileName',index:'originalFileName',id:'originalFileName',width:150,align:"center",formatter:'FilesLinks',editable:true,resizable:false,formoptions:{rowpos:1,colpos:1,label:"<font color='red'>File</font>"},editrules:{required:true},edittype:'file',editoptions: {enctype: "multipart/form-data",method:"post"}}      
            //{name:'originalFileName',hidden: true, width:150,align:"left",edittype:'select', resizable:false}         
        ],      
        //pager: pager,
        rowNum:10,      
        rowList:[], //disable the page size dropdown
        pgbuttons: false, //disable page control like next , back
        pgtext: null,         // disable pager text like 'Page 0 of 10'
        viewrecords: false ,   // disable current view record text like 'View 1-10 of 100' 
        //loadOnce:true,    
        rownumbers:false,
        loadComplete: function() {

        },
        multiselect: del,
        gridview : true,
        sortname: 'id',                 
        sortorder: "asc",                   
        toppager:true,
        caption:caption,
        hidegrid: false,
        beforeSelectRow: function(rowid, e) {     
            var $link = $('a', e.target);
            if (e.target.tagName.toUpperCase() === "A" || $link.length > 0) 
            {
            return false;   
            }     
        }  
    }); 
jQuery(table).jqGrid('navGrid',pager,{del:false,add:false,edit:false,search:false,refresh:true,cloneToTop:true},{},{},{},{});       

        }
4

0 回答 0