1
zrg
2025-07-16 3cb2b515aeb391ae735009ff1b7dab292eb08447
WebTM/views/»ù´¡×ÊÁÏ/Òþ²ØÁÐÉèÖÃ/Gy_GridView_Hide.html
@@ -23,6 +23,11 @@
            margin-left: -15px;
            margin-right: -15px;
        }
        /*用于标记talbe中可以触发行拖拽效果的列*/
        .drag-column{
        }
    </style>
</head>
<body>
@@ -332,7 +337,11 @@
                , cellMinWidth: 90
                , limit: 500
                , cols: [[
                    { field: 'ColumnName', title: '列名', width: 100 }
                    {
                        field: 'ColumnName', title: '列名', width: 100, templet: function (d) {
                            return '<div class="drag-column" style="cursor: move; width: 100%; height: 100%;">' + d.ColumnName + '</div>';
                        }
                    }
                    , { file: 'IsHide', title: '是否隐藏', width: 100, templet: '#IsHide' }
                    , { field: 'Alignment', title: '对齐方式', width: 100, templet: '#Alignment' }
                    , { field: 'ColumnWidth', title: '列宽', width: 100, edit: 'text' }
@@ -342,7 +351,9 @@
                ]]
                , even: true
                , rowDrag: {/*trigger: 'row',*/
                    done: function (obj) {
                    trigger: '.drag-column' // æŒ‡å®šè§¦å‘拖拽的元素选择器
                    ,onlyHandle: true // è®¾ä¸ºtrue表示只有trigger指定的元素才能触发拖拽
                    ,done: function (obj) {
                        // å®Œæˆæ—¶ï¼ˆæ¾å¼€æ—¶ï¼‰è§¦å‘
                        // å¦‚果拖动前和拖动后无变化,则不会触发此方法
                        console.log(obj.row) // å½“前行数据