of_deleterow


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv_rowmanager   >   of_deleterow   

Full name pfc_n_cst_dwsrv_rowmanager.of_deleterow
Access public
Extend of integer
Return value integer
Prototype public function integer of_deleterow(long)

Name Datatype
No Data

Name Datatype
li_confirm integer
li_rc integer

public function integer of_deleterow (long al_row);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_DeleteRow
//
//	Access:  Public
//
//	Arguments:
//	al_delete_row:  Identifies the row you want to delete.
//	Specify 0 to delete the current row.
//
//	Returns:  integer
//	 1 = success
//	 0 = Row was not deleted
//	-1 = error
//
//	Description:
//	Deletes the specified row in the datawindow
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

integer	li_rc
integer	li_confirm = 1

// Validate requestor DW
if IsNull(idw_requestor) Or not IsValid (idw_requestor) then
	return -1
end if

// Confirm delete
if ib_confirmondelete then
	li_confirm = of_ConfirmDelete (1)
end if

// Delete row
if li_confirm = 1 then
	if al_row = 0 then
		al_row = idw_requestor.GetRow()
		if al_row <= 0 then return -1
	end if
	li_rc = idw_requestor.DeleteRow (al_row)
	if li_rc > 0 then
		al_row --
		if al_row <= 0 then
			al_row = 1
		end if
		if idw_requestor.RowCount() > 0 then
			idw_requestor.SetRow (al_row)
			idw_requestor.ScrollToRow (al_row)
			idw_requestor.SetFocus()
		end if
	end if
end if

return li_rc


end function

     
Name Owner
pfc_n_cst_dwsrv_rowmanager.pfc_deleterow pfc_n_cst_dwsrv_rowmanager

     
Name Owner
dragobject.setfocus dragobject
datawindow.deleterow datawindow
datawindow.getrow datawindow
datawindow.rowcount datawindow
datawindow.scrolltorow datawindow
datawindow.setrow datawindow
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
pfc_n_cst_dwsrv_rowmanager.of_confirmdelete pfc_n_cst_dwsrv_rowmanager

     
Full name
No Data

     
Name Scope
No Data