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
XBROWSE ARRAY AUTOSORT
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: XBROWSE ARRAY AUTOSORT
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?
May I know the FWH version you are using?
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
-
- Posts: 55
- Joined: Fri Jul 08, 2011 6:43 am
Re: XBROWSE ARRAY AUTOSORT
It was tested with FWH12.01nageswaragunupudi 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?
Frank
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: XBROWSE ARRAY AUTOSORT
Mr Frank
Kindly check once again.
It is working correctly here.
Sample:
Screenshot:
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
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
-
- Posts: 55
- Joined: Fri Jul 08, 2011 6:43 am
Re: XBROWSE ARRAY AUTOSORT
Nages
compiling with FWH12.02 it is ok. I didn't test it with 12.01
Frank
compiling with FWH12.02 it is ok. I didn't test it with 12.01
Frank
-
- Posts: 55
- Joined: Fri Jul 08, 2011 6:43 am
Re: XBROWSE ARRAY AUTOSORT
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
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
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: XBROWSE ARRAY AUTOSORT
Your observation is correct and thanks for pointing out.IT seems that at the moment sortarraydata is executed , csortorder was not be set.
Till this is fixed, you may please use the workaround of calling oBrw:aCols[ 1 ]:SetOrder() again manually.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India