上传Jqgrid中任何格式的多个文件。

时间:2013-06-10 05:15:33

标签: javascript jquery ajax jqgrid jqgrid-asp.net

是Jqgrid的新手。我不知道如何在jqgrid中上传任何格式的多个文件。我搜索了一些例子,我在谷歌找不到任何东西。这将是非常有用的,如何上传任何格式的多个文件。谢谢你的帮助..!

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},{},{},{},{});       

        }

0 个答案:

没有答案