XBrowse setarray

Post Reply
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

XBrowse setarray

Post 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?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post 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
Regards

G. N. Rao.
Hyderabad, India
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Post by byte-one »

Thanks!!!!!!!
Regards,
Günther
---------------------------------
office@byte-one.com
Post Reply