How work this behavior and what need to work:
This behavior add the dragging capabilities (Drag-And-Drop event) to the first cell of each row in the table you apply the repeat region. When the user drag a cell and drop in a new row position the extension detect the reference of the 2 cells and move the data value of all the rows between the 2 cells in the new position to change the sort order and save the new sort order value in the database records.
To make this extension work in the database table you must have a field where save the sort order of the database record. This field must be a numeric integer field and the value of this field cannot be repeated.
If you want use this behavior on an existing table and you don't have a sort order field with this characteristics you must create the field and give a value to all the existing record, this must be hand write. Is not necessary the values of this fields are progressive and if you have an ID (Unique column key) field you can copy the ID value in the sort order field.
When you insert a new record in this table remenber to insert a new value in the sort order field, to help you on this I create the "Insert value" behavior that you can find in the extension package, read in the next page for more info about this behavior.
Recordset:
The recordset you use to create the repeat region.
Rec sort field:
The table sort order field.
The recordset must have this field also if you don't use it in the repeat region
Rec unique key:
The table unique column key.
The recordset must have this field also if you don't use it in the repeat region
Connection:
The connection for the update sql query. A valid connection for the database whith the table you want update the sort order.
Db table
The table you want change the sort order.
The same table you have in the recordset.
Sort field:
The table sort order field. Normally the same you have in the recordset, but is duplicated so you can use alias in the recordset if you need.
Unique column field:
The table unique column key. Normally the same you have in the recordset, but is duplicated so you can use alias in the recordset if you need.
Key is numeric:
Must be checked if the unique column key value is numeric.
Client table:
This is a very important parameter. The table you want apply the behavior must have the ID attribute in the TABLE tag and this value must be unique in the page. The behavior is apply client-side with a javascript function that use this ID to detect the table where add the drag-and-drop behavior.
Has header:
Define if the table has a header row.
In this case the first cell of the first row don't have the drag-and-drop behavior
Has footer
Define if the table has a footer row
In this case the first cell of the last row don't have the drag-and-drop behavior
Drag class name:
The css style class for the table cell with the drag-and-drop behavior. This is the style class of the first cell, in the example the right cell.
Drag class name active:
The css style class for the table cell with the drag-and-drop behavior.
This class is used to evidence the active row, the active row is the row where the DROP event will change the data. This is the style class of the first cell, in the example the blue cell
The extension insert in the page a div with ID=dwzDragDiv so to define the style for the dragged area you must define a css like:
#dwzDragDiv
{
display:none;
position:absolute;
background-color:#75A9C8;
border:1px dashed #003399;
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=85);
}
Sort on:
Define when start the table update.
The extension can update the value in the database in 2 events:
On submit: the user make all the changes need and when click on the form submit button the extension save in the database the new sort order value.
On Change: every time the user release the mouse (DROP event) the extension save in the database the new sort order value.
Form name:
The name of the form contain the repeat area.