|
pfc_addall
|
|
Full name
|
pfc_u_lvs.pfc_addall
|
Access
|
public
|
Extend of
|
long
|
Return value
|
long
|
Prototype
|
event long pfc_addall(n_ds)
|
Name
|
Datatype
|
ll_addcount
|
Long
|
ll_row
|
Long
|
ll_rowcount
|
Long
|
event pfc_addall;//////////////////////////////////////////////////////////////////////////////
//
// Event: pfc_AddAll
//
// Arguments:
// ads_source data source to use for setting listview item values
//
// Returns: long
// # of items added successfully
// -1 = an error occurred
//
// Description: Add all the rows from data source to the listview.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.0 Initial version
// 7.0 add Arrange(), deferred from pfc_n_cst_lvsrv_datasource.of_InsertItem
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
Long ll_addcount=0
Long ll_rowcount, ll_row
If IsNull(ads_source) or not isvalid(ads_source) then return -1
// loop through the data and add the items
ll_rowcount = ads_source.RowCount()
For ll_row = 1 to ll_rowcount
If this.event pfc_insertitem(ads_source, ll_row, INSERT_LAST, 0) < 1 then
Return -1
End If
ll_addcount++
End For
this.Arrange ( )
return ll_addcount
end event
Name
|
Owner
|
listview.arrange |
listview
|
datastore.rowcount |
datastore
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
pfc_u_lvs.pfc_insertitem |
pfc_u_lvs
|