jQuery EasyUI Erweiterungen - Baum Startreihe Tropfen
Verwendung
Es enthält 'treegrid-dnd.js' Datei
<Script type = "text / javascript" src = "treegrid-dnd.js"> </ script>
Aktivieren Ziehen und Platzierung
<Table title = "Ordner-Browser" class = "easyui-treegrid" style = "width: 700px; height: 250px" Daten-Optionen = " Daten: Daten, rownumbers: true, idField: 'id', treeField: 'name', onLoadSuccess: function (Zeile) { $ (This) .treegrid ( 'enableDnd', Reihe row.id :? Null); } "> <Thead> <Tr> <Th Daten-Optionen = "Feld: 'name'" width = "220"> Name </ th> <Th Daten-Optionen = "Feld:" Größe "" width = "150" align = "right"> Größe </ th> <Th Daten-Optionen = "Feld: 'date'" width = "200"> Änderungsdatum </ th> </ Tr> </ Thead> </ Table>
Ereignis
Die Veranstaltung erstreckt sich von dem Baumrost (treegrid) sind die folgenden Ereignisse für den Baumrost (treegrid) zugegeben.
名称 | 参数 | 描述 |
---|---|---|
onBeforeDrag | row | 当一行的拖拽开始前触发,返回 false 则取消拖拽。 |
onStartDrag | row | 当开始拖拽一行时触发。 |
onStopDrag | row | 当停止拖拽一行后触发。 |
onDragEnter | targetRow, sourceRow | 当拖拽一行进入某允许放置的目标行时触发,返回 false 则取消放置。 |
onDragOver | targetRow, sourceRow | 当拖拽一行在某允许放置的目标行上时触发,返回 false 则取消放置。 |
onDragLeave | targetRow, sourceRow | 当拖拽一行离开某允许放置的目标行时触发。 |
onBeforeDrop | targetRow,sourceRow,point |
当一行被放置前触发,返回 false 则取消放置。 targetRow:放置的目标行。 sourceRow:拖拽的源行。 point:指示放置的位置,可能的值:'append'、'top' 或 'bottom'。 |
onDrop | targetRow,sourceRow,point |
当一行被放置时触发。 targetRow:放置的目标行。 sourceRow:拖拽的源行。 point:指示放置的位置,可能的值:'append'、'top' 或 'bottom'。 |
Weg
Die Methoden reichen von der Baumgitter (treegrid).
名称 | 参数 | 描述 |
---|---|---|
enableDnd | id |
启用行的拖拽与放置。 'id' 参数指示要被拖拽与放置的行。 如果该参数未指定,则拖拽与放置所有行。 |
Download von jQuery EasyUI Beispiele
jquery-easyui-treegrid-dnd.zip
jQuery EasyUI Erweiterte