|
of_UnRegisterReportColumn
|
|
Full name
|
pfc_n_cst_lvsrv_datasource.of_UnRegisterReportColumn
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_UnRegisterReportColumn(integer)
|
Name
|
Datatype
|
li_cnt
|
integer
|
li_cols
|
integer
|
li_index
|
integer
|
lnv_columns
|
n_cst_columnattrib[]
|
lnv_empty
|
n_cst_columnattrib[]
|
public function integer of_UnRegisterReportColumn (integer ai_column);//////////////////////////////////////////////////////////////////////////////
// Public Function: of_UnRegisterReportColumn
// Arguments: ai_column the column to be removed.
// Returns: Integer
// 1 if successful, -1 if an error occurred
// Description: Delete the column in the ListView control and sync the internal column arrays.
// Columns are displayed in Report View only.
// NOTE: If you perform this function on column 1 you
// should call of_Refresh to refresh the data view.
//////////////////////////////////////////////////////////////////////////////
// Rev. History: Version
// 6.0 Initial version
//////////////////////////////////////////////////////////////////////////////
// Copyright © 1996-1999 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.
//////////////////////////////////////////////////////////////////////////////
integer li_cols, li_cnt, li_index
n_cst_columnattrib lnv_empty[], lnv_columns[]
li_Cols = UpperBound(inv_ColAttrib)
// validate required reference
if IsNull(ilv_requestor) or NOT IsValid(ilv_requestor) then return -1
if IsNull(ai_column) or (ai_column > li_cols) or (ai_column < 1) then return -1
// Delete the listview column
if ilv_requestor.DeleteColumn(ai_column) < 1 then return -1
// Sync internal arrays
for li_Cnt = 1 to (ai_column - 1)
lnv_Columns[li_Cnt] = inv_ColAttrib[li_Cnt]
next
for li_index = (ai_column + 1) to li_cols
lnv_Columns[li_index - 1] = inv_ColAttrib[li_index]
next
inv_ColAttrib = lnv_empty
inv_ColAttrib = lnv_Columns
return 1
end function
Name
|
Owner
|
listview.deletecolumn |
listview
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|