Actualizar los datos del un virtual GRID
Moderator: Rathinagiri
- mjaviergutierrez
- Posts: 146
- Joined: Fri Nov 30, 2012 7:51 pm
- Location: San Lorenzo, Santa Fe, Argentina
- AUGE_OHR
- Posts: 2064
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: Actualizar los datos del un virtual GRID
hi,
after update Array call thismjaviergutierrez wrote: ↑Wed Sep 30, 2020 12:44 am hola, como actualizo los datos de un virtual grid ?
Code: Select all
PROCEDURE RefreshCurrent( cForm, cBrowse )
LOCAL hBrowse := GetControlHandle( cBrowse, cForm )
LOCAL nRecord := GetProperty( cForm, cBrowse, "VALUE" )
ListView_RedrawItems( hBrowse, nRecord, nRecord )
RETURN
have fun
Jimmy
Jimmy
- mjaviergutierrez
- Posts: 146
- Joined: Fri Nov 30, 2012 7:51 pm
- Location: San Lorenzo, Santa Fe, Argentina
- SALINETAS24
- Posts: 667
- Joined: Tue Feb 27, 2018 3:06 am
- DBs Used: DBF
- Contact:
Re: Actualizar los datos del un virtual GRID
Y ya que estamos...,
¿en que se diferencia un GRID NORMAL cargado con un array, imaginemos de 1000 elementos y de un GRID VIRTUAL, que también carga un array de 1000 elementos?
Quedo agradecido de antemano por la aclaración....
¿en que se diferencia un GRID NORMAL cargado con un array, imaginemos de 1000 elementos y de un GRID VIRTUAL, que también carga un array de 1000 elementos?
Quedo agradecido de antemano por la aclaración....
Como dijo el gran pensador Hommer Simpson..., - En este mundo solo hay 3 tipos de personas, los que saben contar y los que no.
- AUGE_OHR
- Posts: 2064
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: Actualizar los datos del un virtual GRID
hi,
normal you have to load each Element using AddItem() ... this can take some Time
when already have a Array e.g. Directory() you need this
you do not have to use AddItem while Data are read "on-fly" when QUERYDATA Event ( LVN_GETDISPINFO ) is fired
FUNCTION OnData is like "DbSkipper" in TBrowse but much faster to display Data in GRID.
normal you have to load each Element using AddItem() ... this can take some Time
when already have a Array e.g. Directory() you need this
Code: Select all
aDir := Directory()
...
ITEMCOUNT LEN( aDir )
VIRTUAL .T.
ON QUERYDATA OnDataRequestStruct( aDir )
Code: Select all
FUNCTION OnDataRequestStruct( aData )
LOCAL xVal
LOCAL nRow := This.QueryRowIndex
LOCAL nCol := This.Querycolindex
IF .NOT. EMPTY( nRow ) .AND. nRow <= LEN( aData )
xVal := aData[ nRow ] [ nCol ]
This.QueryData := xVal
ENDIF
RETURN .T.
have fun
Jimmy
Jimmy