flexgrid

表格的构造:

$('#assginList').flexigrid({
            title: 'Your DR Member',
            height: 300,
            width :1200,
            striped:true,
            usepager: true,
            dataType: 'json',
            nomsg: 'Data nothing',
            showTableToggleBtn: true,
            blockOpacity: 0.5,
            gridClass: "bbit-grid",
            showcheckbox: true,
            method: 'POST',
            checkbox:true,
            autoload: true,
            url: '<%=request.getContextPath()%>/memberAction.do?method=initMyEmployee',
            colModel : [ {
                display : '',
                hide:true,
                name : 'id',
                width : 20,
                sortable : true,
                align : 'center'
            }, {
                display : '<input type="checkbox" id="jobRoleId"/>',
                hide:true,
                name : 'ch',
                width : 20,
                sortable : true,
                align : 'center'
            },{
                display : 'No',
                name : 'no',
                width : 20,
                sortable : true,
                align : 'center'
            }, {
                display : 'Status',
                name : 'status',
                width : 100,
                sortable : true,
                align : 'left'
            }, {
                display : 'Country',
                name : 'country',
                width : 60,
                sortable : true,
                align : 'left'
            }, {
                display : 'Serial No',
                name : 'sn',
                width : 40,
                sortable : true,
                align : 'left'
            }, {
                display : 'Employee Notes ID',
                name : 'eNotesId',
                width : 150,
                sortable : true,
                align : 'left'
            }, {
                display : 'Manager Notes ID',
                name : 'mNotesId',
                width : 150,
                sortable : true,
                align : 'left'
            }, {
                display : 'Current Job Role',
                name : 'jobRole',
                width : 150,
                sortable : true,
                align : 'left'
            }, {
                display : 'Verification Status',
                name : 'verificationStatus',
                width : 90,
                sortable : true,
                align : 'left'
            }, {
                display : 'Skill Gap',
                name : 'skill gap',
                width : 40,
                sortable : true,
                align : 'center'
            }, {
                display : 'Last Verified By',
                name : 'lastVerifiedBy',
                width : 180,
                sortable : true,
                align : 'left'
            }, {
                display : 'Action',
                name : 'action',
                width : 50,
                sortable : true,
                align : 'center'
            } ],
            buttons : [ {
                name : 'Request Add',
                bclass : 'add',
                onpress : btnClick
            }, {
                separator : true
            },{
                name : 'Request Delete',
                bclass : 'delete',
                onpress : btnClick
            }, {
                separator : true
            }, {
                name : 'Request Waive',
                bclass : 'waive',
                onpress : btnClick
            } ]
        });

 

获取选中的值:

function delRequest(grid)
        {
                     var  ids ="flag=del&id=";  
                     for(var i=0;i<$('.trSelected',grid).length;i++){  
                        ids+=","+$('.trSelected',grid).find("td:first").eq(i).text();//获取id  
                      }
                    $.ajax({
                    url:"<%=request.getContextPath()%>/memberAction.do?method=sendEmail",
                    type:"POST",
                    data: ids,
                    dataType:"text"                 
                 });
        }

你可能感兴趣的:(Flex)