JqxDragDrop: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Line 12: Line 12:


<pre>
<pre>
Dim data, source, dataAdapter
Dim n=0
data = generatedata(50)    'generatedata is a function which returns grid data
 
source = {localdata: data, datatype: "array"}
Function DragDrop1_onTargetDrop()
dataAdapter = new $.jqx.dataAdapter(source)
  n=n+1
             
  TextArea1.value=TextArea1.value & Label1.textContent & " " & n & vbCRLF 
Grid1_settings.source = dataAdapter
End Function
Grid1_settings.columns = [ _
    { text: "First Name", dataField: "firstname", width: 100 }, _
    { text: "Last Name", dataField: "lastname", width: 100 }, _
    { text: "Product", dataField: "productname", width: 180 }, _
    { text: "Quantity", dataField: "quantity", width: 80, cellsalign: "right" }, _
    { text: "Unit Price", dataField: "price", width: 90, cellsalign: "right", cellsformat: "c2" }, _
    { text: "Total", dataField: "total", cellsalign: "right", minwidth: 100, cellsformat: "c2" } _
  ]
</pre>
</pre>



Revision as of 21:34, 4 January 2013

Description

jqxDragDrop is a plugin which will make any control draggable. It can be used in combination with many widgets like jqxTree, jqxGrid, jqxListBox and etc.

Properties and Methods

See the complete documentation at jqWidget's site: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxdragdrop/jquery-dragdrop-getting-started.htm

Example

Dim n=0

Function DragDrop1_onTargetDrop()
  n=n+1
  TextArea1.value=TextArea1.value & Label1.textContent & " " & n & vbCRLF  
End Function

Output

See above.