ListBox Basic
ListBox component is used to select one or multiple values existing values
InnerDataSet Binding
ListBox is basically used to present data by using the InnerDataSet.
Way of using ListBox Contents
Go to properties window and you can see innerdataset, There are two buttons one choosing dataset and one more "…" button to open component editor.
By clicking on "…" button the following window will appear.
DataSet binding
ListBox is basically used to represent data binding with DataSet.
If want to use characteristics data in ListBox we should have to bind InnerDataSet with DataSet, we take care there should be data in dataset first.
MultiSelect
You can check the selected value of the ListBox, you can Select all.
We can choose multiple rows in ListBox. There are two ways, first pressing control key then selecting value by mouse and second is pressing shift key then selecting value by mouse.
Getting selected value
this.Button00_onclick = function (obj:Button, e:ClickEventInfo) { var i; var select_Cnt = 0; var msg = "Selected Record \n"; select_Cnt = this.ListBox02.getSelectedCount(); for (i = 0; i < select_Cnt; i++) { if (this.ListBox02.getSelect(i) == true) { msg += "Row : " + i + "\n"; } } msg += "Selected Record Count : " + select_Cnt; this.alert(msg); }
Select All values in ListBox
this.Button01_onclick = function (obj:Button, e:ClickEventInfo) { for(i=0;i<this.ds_code.getRowCount();i++) { this.ListBox02.setSelect(i, true); } }
Source Location
Sample\ListBox\np_ListBox_Basic.xfdl