Database application development is a feature of JBuilder Professional and Enterprise. Distributed application development is a feature of JBuilder Enterprise.
You can sort and filter the data in any StorageDataSet
. However, there are situations where you need the data in the StorageDataSet
presented using more than one sort order or filter condition simultaneously. The DataSetView
component provides this capability.
The DataSetView
component also allows for an additional level of indirection which provides for greater flexibility when changing the binding of your UI components. If you anticipate the need to rebind your UI components and have several of them, bind the components to a DataSetView
instead of directly to the StorageDataSet
. When you need to rebind, change the DataSetView
component to the appropriate StorageDataSet
, thereby making a single change that affects all UI components connected to the DataSetView
as well.
To create a DataSetView
object, and set its storageDataSet
property to the StorageDataSet
object that contains the data you want to view,
Add a DataSetView
component from the Data Express tab to the component tree or the UI designer.
Set the storageDataSet
property of the DataSetView
component to queryDataSet1
.
The DataSetView
navigates independently of its associated StorageDataSet
. Add another TableScrollPane
and JdbTable
to the UI designer. To enable the controls to navigate together, set the dataSet
property of the JdbTable
to dataSetView1
.
Compile and run the application.
DataSetView
displays the data in the QueryDataSet
but does not duplicate its storage. It presents the original unfiltered and unsorted data in the QueryDataSet
.
You can set filter and sort criteria on the DataSetView
component that differ from those on the original StorageDataSet
. Attaching a DataSetView
to a StorageDataSet
and setting new filter and/or sort criteria has no effect on the filter or sort criteria of the StorageDataSet
.
To set filter and/or sort criteria on a DataSetView
,
DataSetView
component.
sort
property to change the order records are displayed in the DataSetView
. See "Sorting data" for more information on the sortDescriptor
.
masterLink
property to define a parent data set for this view. See "Establishing a master-detail relationship" for more information on the masterLinkDescriptor
.
filterRow
method to temporarily hide rows in the DataSetView
. See "Filtering data" for more information on filtering.
You can edit, delete, and insert data in the DataSetView
by default. When you edit, delete, and insert data in the DataSetView
, you are also editing, deleting, and inserting data in the StorageDataSet
the DataSetView
is bound to.
enableDelete
property to false
to disable the user's ability to delete data from the StorageDataSet
.
enableInsert
property to false
to disable the user's ability to insert data into the StorageDataSet
.
enableUpdate
property to false
to disable the user's ability to update data in the StorageDataSet
.