Page 1 of 1
XBrowse setarray
Posted: Mon Dec 17, 2007 12:33 pm
by byte-one
When I change with (oBrw:setarray( array ) , oBrw:refresh()) the actual array with same structure, the headertext and oBrw:hide(column), etc. are loosing!
Is this normal?
Posted: Mon Dec 17, 2007 1:15 pm
by nageswaragunupudi
SetArray method erases all the existing columns and adds all the the array columns again. So SetArray should be used only once in the beginning. Should not be used again.
If you want to substitute a similar array, you may
Code: Select all
oBrw:aArrayData := aSubstitute
oBrw:Refresh()
If the following modification is made in the SetArray method of TXBrwose, it would be possible to use SetArray method to reassign array and also to have different column assignments. Proposed change in the method, if FWH agrees to:
Code: Select all
METHOD SetArray( aData, ................. )
<.......... code ....... >
// requested change:
if empty( ::aCols )
// end or proposed change:
// existing code
::aCols := {}
for 1 := 1 to len( aData[ 1 ] )
< ... existing code till the end ..>
// req change
endif
// end if change
return nil // proposed return self
Posted: Mon Dec 17, 2007 4:40 pm
by byte-one
Thanks!!!!!!!