>>Thanks.
>
>Hi Allan.
>Privet Nick!
>I wrote "place AFTER grids objects" then you need for grid init works before gridsaver init. If you place gridsaver on form at last order, then gridsaver init will work last and see all grids.
>Tell me. Is my example do't works? Example have a lots grids in diffrent containers.
>If during work you place on form new grid object, delete gridsaver from form and place again (for control have last order).
>Let me know if problems stay.
>Denis Gavrikov
>marka@aha.ru
Hi Denis,
Thanks for responding.
The control was added after all other controls on the form were put in place - so it should 'have last order'. I do have the following code in the init of my grid - do you think this could be causing the problem?
* Grid.init
DO CASE
CASE thisform.sort_mode = 1
select recno() ;
from (this.recordsource) ;
order by trandate ;
where postrec1 = .f. and trace_no = 0 ;
into array ;
thisform.aOrder && A custom array property
this.setall("DynamicBackColor",;
"iif(ascan(thisform.aOrder,"+;
"recno())%2=0,rgb(255,255,255),rgb(214,227,206))","Column")
CASE thisform.sort_mode = 2
select recno() ;
from (this.recordsource) ;
order by desctext ;
where postrec1 = .f. and trace_no = 0 ;
into array ;
thisform.aOrder && A custom array property
this.setall("DynamicBackColor",;
"iif(ascan(thisform.aOrder,"+;
"recno())%2=0,rgb(255,255,255),rgb(214,227,206))","Column")
CASE thisform.sort_mode = 3
select recno() ;
from (this.recordsource) ;
order by debits ;
where postrec1 = .f. and trace_no = 0 ;
into array ;
thisform.aOrder && A custom array property
this.setall("DynamicBackColor",;
"iif(ascan(thisform.aOrder,"+;
"recno())%2=0,rgb(255,255,255),rgb(214,227,206))","Column")
CASE thisform.sort_mode = 4
select recno() ;
from (this.recordsource) ;
order by credits ;
where postrec1 = .f. and trace_no = 0 ;
into array ;
thisform.aOrder && A array property
this.setall("DynamicBackColor",;
"iif(ascan(thisform.aOrder,"+;
"recno())%2=0,rgb(255,255,255),rgb(214,227,206))","Column")
CASE thisform.sort_mode = 5
select recno() ;
from (this.recordsource) ;
order by posref ;
where postrec1 = .f. and trace_no = 0 ;
into array ;
thisform.aOrder && A form or grid custom array property
this.setall("DynamicBackColor",;
"iif(ascan(thisform.aOrder,"+;
"recno())%2=0,rgb(255,255,255),rgb(214,227,206))","Column")
CASE thisform.sort_mode = 6
select recno() ;
from (this.recordsource) ;
order by os1 ;
where postrec1 = .f. and trace_no = 0 ;
into array ;
thisform.aOrder && A form or grid custom array property
this.setall("DynamicBackColor",;
"iif(ascan(thisform.aOrder,"+;
"recno())%2=0,rgb(255,255,255),rgb(214,227,206))","Column")
ENDCASE
Al Williams
Anola MB, CANADA