GS_ComboBox

Unofficial Content

Scope

Objects: Web Panels, Web Components, Web Transaction
Languages: .NET
Interfaces: Web

Control Description

GS_ComboBox is an implementation of jQuery UI MultiSelect Widget.

  • jQuery 1.4.2+ and jQuery-ui.min-1.8
  • CSS Styling jQuery-UI
  • Testeado en Genexus X Evolution 2 Beta 4.
  • .Net environment
  • MS Sql Server
  • This control doesn´t interfer with others gxui.usercontrol or controls that use jQuery.

Examples of Use

How To : Basic example of use

&varchar = GS_ComboBox1.ComboValue()

How To : Basic example with &var collection in conditions. GS_ComboBox1.Output = &VarCharCollection

Attribute in &VarCharCollection when &VarCharCollection.ToJson()<>'[]';
When &VarCharCollection has a value, that value appears preselected for default in the list.

 

Control Demo

GS_ComboBox

Download:  KB Demo Dinamic Value

 KB in Genexus X Ev 2 Beta 4 C# .net environment

 

Properties

 

Option

Description

Default

ComboItems

{"Cd":"CO","Nm":"Cobros"},{"Cd":"2","PA":"Pagos"}

Text JSON format.

ContainerHeight

Height of the checkbox container (scroll area) in pixels. If set to “auto”, the height will calculate based on the number of checkboxes in the menu.

 

175

selectedText

The text to display in the select box when options are selected (if selectedList is false). A pound sign (#) will automatically replaced by the number of checkboxes selected. If two pound signs are present in this parameter, the second will be replaced by the total number of checkboxes available. Example: "# of # checked".

This parameter also accepts an anonymous function with three arguments: the number of checkboxes checked, the total number of checkboxes, and an array of the checked checkbox DOM elements. See examples for usage.

# de # elegidos

selectedList

A numeric (or boolean to disable) value denoting whether or not to display the checked opens in a list, and how many. A number greater than 0 denotes the maximum number of list items to display before switching over to the selectedText parameter. A value of 0 or false is disabled.

false

effectshow

The name of the effect to use when the menu opens. To control the speed as well, pass in an array: 'slide', 500

empty string

'slide', 500

slide

effecthide

The name of the effect to use when the menu closes. To control the speed as well, pass in an array: 'explode', 500

empty string

'slide', 500

slide

autoOpen

A boolean value denoting whether or not to automatically open the menu when the widget is initialized.

false

multiple

If set to false, the widget will use radio buttons instead of checkboxes, forcing users to select only one option.

true

Output

The variable that receives the value of combobox to use in conditions, is a varchar collection.

Height

Height of the entire widget in pixels. Setting to “auto” will disable.

22

Width

Minimum width of the entire widget in pixels. Setting to “auto” will disable.

225

header

If you pass a string, the default “check all”, “uncheck all”, and “close” links will be replaced with the specified text.

checkAllText

The text of the “check all” link.

Todos

uncheckAllText

The text of the “uncheck all” link.

Ninguno

noneSelectedText

The default text the select box when no options have been selected.

Seleccionar...

Filter

Boolean value that triggers a search filter field. When true enables the search filter field.

true

label

Text to label search Field

Buscar...

FilterFieldWidht

Width of the search Field

auto

placeholder

The HTML5 placeholder attribute value of the input. Only supported in webkit as of this writing. Defaults to "Enter keywords"

Escriba aqui...

class

Additional class(es) to apply to BOTH the button and menu for further customization. Separate multiple classes
with a space. You’ll need to scope your CSS to differentiate between the button/menu:

/* button */

.ui-multiselect.myClass {}

/* menu */
.ui-multiselect-menu.myClass {}

 
Dinamic (Version 1.2)

A Boolean value that enables dynamic load of the combobox. When true enables property "ComboItems" is ignored.

false
restProcedure  (Version 1.2) Name of web services REST procedure that returns the values ​​for the ComboBox.
Example of what should be returned:
{"ComboVal ":{" Cd", "Pago", "Nm": "Pagos"},{"Cd", "Cobro", "Nm": "Cobros"}}
 
ParamsRest Parameters sent to web services. Example: {"ValListTp": "TesoDocuEstd"}  

Method

Description

refresh

Reloads the checkbox menu. If you’re dynamically adding/removing option tags on the original select via AJAX or DOM manipulation methods, call refresh to reflect the changes in the widget.

disabled

Disable the entire widget.

enabled

Enable the entire widget.

checkAll

Check all checkboxes.

uncheckAll

Uncheck all checkboxes.

ComboValue

Returns comma separated values

openCombo  (Version 1.2) Open the combobox
closeCombo  (Version 1.2) Close the combobox