Page 1 of 1
XBROWSE ARRAY AUTOSORT
Posted: Mon Mar 05, 2012 8:17 am
by Demont Brecht
Hello ,
When an array is build as :
XBROWSE oBrw ARRAY Columns 2,1,..... AUTOSORT
The array is at startup wrongly sorted on the first column from the array ( second column from the browse)
It should be the first column from the browse (second from the array)
Frank
Re: XBROWSE ARRAY AUTOSORT
Posted: Thu Mar 08, 2012 8:07 pm
by nageswaragunupudi
I remember this was an issue in older versions. I think this is working correctly in the recent versions .
May I know the FWH version you are using?
Re: XBROWSE ARRAY AUTOSORT
Posted: Fri Mar 09, 2012 8:42 am
by Demont Brecht
nageswaragunupudi wrote:I remember this was an issue in older versions. I think this is working correctly in the recent versions .
May I know the FWH version you are using?
It was tested with FWH12.01
Frank
Re: XBROWSE ARRAY AUTOSORT
Posted: Sat Mar 17, 2012 6:30 am
by nageswaragunupudi
Mr Frank
Kindly check once again.
It is working correctly here.
Sample:
Code: Select all
#include "fivewin.ch"
#include "xbrowse.ch"
function Main()
local aData := { { 1000, 'C-cccc' }, { 2000, 'B-bbbb' }, { 3000, 'A-aaaa' } }
XBROWSER aData COLUMNS { 2, 1 } AUTOSORT ;
SETUP oBrw:cHeaders := { "Second", "First" }
return nil
Screenshot:
Re: XBROWSE ARRAY AUTOSORT
Posted: Sun Mar 18, 2012 6:33 pm
by Demont Brecht
Nages
compiling with FWH12.02 it is ok. I didn't test it with 12.01
Frank
Re: XBROWSE ARRAY AUTOSORT
Posted: Sun Apr 01, 2012 10:19 am
by Demont Brecht
Hello,
Now i am working with FWH12.03 , but it seems that there is a problem with ordering the first time in next situation :
@ 0,0 XBROWSE oBrw ARRAY Arr PIXEL OF oDlg FONT oFont;
COLUMNS aCol;
HEADERS aHead;
COLSIZES aWidth;
SORT aSort;
I checked
aCol : 1,2,3,4
aSort: 4,2,3,4
If i understand well , cSortorder from column 1 should be 4
This line invokes ocol:SortArrayData()
Placing DBG self , i can see that is ordered from column 1 , but csortorder is not be set to 4 (is 1)
After clicking the column header it is ok.
IT seems that at the moment sortarraydata is executed , csortorder was not be set.
Frank
Re: XBROWSE ARRAY AUTOSORT
Posted: Sun Apr 01, 2012 12:56 pm
by nageswaragunupudi
IT seems that at the moment sortarraydata is executed , csortorder was not be set.
Your observation is correct and thanks for pointing out.
Till this is fixed, you may please use the workaround of calling oBrw:aCols[ 1 ]:SetOrder() again manually.