JqxSwitchButton: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
== Description ==
== Description ==
The jqxSwitchButton represents a button widget that switches its checked state after a click. It is very similar to the jqxToggleButton, but it has different UI look.
The jqxSwitchButton represents a button widget that switches its checked state after a click. It is very similar to the jqxToggleButton, but it has different UI look.
jqWidgets is a commercial product, which depending on how you use it, requires a license fee. Complete details are on jqWidget's website. The product is well supported.


== Properties and Methods ==
== Properties and Methods ==


See the complete documentation at jqWidget's site:
This control is well documented on the jqWidget's website: http://www.jqwidgets.com/jquery-widgets-documentation/.
http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxbutton/jquery-button-getting-started.htm


== Example ==
== Example ==


<pre>
<pre>
Dim data, source, dataAdapter
Function SwitchButton1_onchange()
data = generatedata(50)     'generatedata is a function which returns grid data
  MsgBox "Changed!"
source = {localdata: data, datatype: "array"}
End Function
dataAdapter = new $.jqx.dataAdapter(source)
 
             
'Set the checked property.
Grid1_settings.source = dataAdapter
$("#jqxSwitchButton").jqxSwitchButton({ checked:true })
Grid1_settings.columns = [ _
 
    { text: "First Name", dataField: "firstname", width: 100 }, _
'Get the checked property.
    { text: "Last Name", dataField: "lastname", width: 100 }, _
var checked = $("#jqxSwitchButton").jqxSwitchButton("checked")
    { 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>


== Output ==
== Output ==
[[Category:Language Reference]]
[[Category:jqWidgets]]
[[Category:Controls]]

Latest revision as of 17:20, 7 April 2016

Description

The jqxSwitchButton represents a button widget that switches its checked state after a click. It is very similar to the jqxToggleButton, but it has different UI look.

jqWidgets is a commercial product, which depending on how you use it, requires a license fee. Complete details are on jqWidget's website. The product is well supported.

Properties and Methods

This control is well documented on the jqWidget's website: http://www.jqwidgets.com/jquery-widgets-documentation/.

Example

Function SwitchButton1_onchange()
  MsgBox "Changed!"
End Function

'Set the checked property.
$("#jqxSwitchButton").jqxSwitchButton({ checked:true })

'Get the checked property.
var checked = $("#jqxSwitchButton").jqxSwitchButton("checked")

Output