nc_dstolv


Ancestor

nonvisualobject

Library

dstolv.pbl

Author

Ken Howe

Description

This object will create a listview control based on the column sizes of the datawindow syntax for the passed datastore. It will create headers based on the column header text values and populate the listview with any data currently retrieved into the datastore.

Usage

After retrieving your datastore create this object and call the convert function passing a reference to the listview control and the datastore control.

Model

nc_dstolv
(none)
integer convert (listview alv_LV, datastore ads_DS)
integer convert (listview alv_lv, datastore ads_ds, listviewitem alvi_LVI)
integer convert (listview alv_lv, datastore ads_ds, listviewitem alvi_LVI, string as_DataCol)
string itemtostring (datastore ads_ds, long al_row, string as_column)
integer reset (listview alv_LV)

Functions


convert

Description Define and Populate a listview control based on a datastore definition. This version of the function just defaults the values and calls the real function.

Return integer
  • See Other function

  • Access public

    Arguments
    Argument DataType Description
    alv_LV listview List view control to Define and populate.
    ads_DS datastore Datastore to use for definition.

    Usage lnc_dstolv.Convert( lv_1, lds_Employees )


    convert

    Description Define and Populate a listview control based on a datastore definition. This version of the function just defaults the values and calls the real function.

    Return integer
  • See Other function

  • Access public

    Arguments
    Argument DataType Description
    alv_lv listview List view control to Define and populate.
    ads_ds datastore Datastore to use for definition.
    alvi_LVI listviewitem Default listview item.

    Usage lnc_dstolv.Convert( lv_1, lds_Employees, llvi_LVI )


    convert

    Description Define and Populate a listview control based on a datastore definition.

    Return integer
  • 1, Defined and populated ok
  • -1, Conversion failed
  • -2, Invalid Listview control
  • -3, Invalid Datastore control
  • -4, No Columns Found In Datastore

  • Access public

    Arguments
    Argument DataType Description
    alv_lv listview List view control to Define and populate.
    ads_ds datastore Datastore to use for definition.
    alvi_LVI listviewitem Predefined Listview item.
    as_DataCol string Column to use to populate Data Attribute.

    Usage lnc_dstolv.Convert( lv_1, lds_Employees, lstr_LVI, 'ssn' )


    itemtostring

    Description Convert a specified data item in the datastore to a string.

    Return string
    Item as a string value.

    Access protected

    Arguments
    Argument DataType Description
    ads_ds datastore Datastore to extract item.
    al_row long Row to extract item.
    as_column string Column to extract item.

    Usage ls_Val = ItemToString( lds_DS, 1, 'firstname' )


    reset

    Description Reset the contents of a list view control.

    Return integer
  • 1, Reset ok
  • -1, Reset failed

  • Access protected

    Arguments
    Argument DataType Description
    alv_LV listview Listview to reset

    Usage Reset( lv_1 )

    Events

    (none)

    See Also

    (none)