Page 2 of 3
Re: TREE control used as main menu - problems
Posted: Tue Sep 02, 2014 8:02 am
by Agil Abdullah
Hi Andy,
I took a test on your demo-menu, I found it oke.
I am learning. Thanks.
-Agil
Re: TREE control used as main menu - problems
Posted: Tue Sep 02, 2014 8:40 am
by asacaric
I must say that GRID control doesn't work as it should
ARTIKLI.DBF has 4 INDEXes that are selected via ON HEADCLICK.
ON HEADCLICK changes INDEX ORDER, but I didn't find out how to stay on selected record.
Sometimes it stays, sometimes it does not.
I've tried your examples and advices and it really doesn't work - it is not usable.
After switching to BROWSE control, everything works as it should.
Code: Select all
function ARTIKLI_SORT
parameters morder
select artikli
private mrn := recno()
set order to morder
dbgoto(mrn)
FORM_ARTIKLI.BROWSE_artikli.refresh
return nil
Any suggestion?
Re: TREE control used as main menu - problems
Posted: Tue Sep 02, 2014 4:38 pm
by andyglezl
Hola asacaric / Hello asacaric
3) File ARTIKLI.DBF is opened with 4 indexes and I use ON HEADCLICK to SET ORDER.
How to stay on current RecNo() after SET ORDER? If I use GRID_ARTIKLI.REFRESH, it moves on 1st record.
If I don't refresh, GRID_ARTIKLI isn't refreshed and doesn't show correct data.
Si el "CONTROL BROWSE" te funciona, cual es la razón de querer utilizar el CONTROL GRID ???
El BROWSE trabaja directamente con la DB (por eso, el RecNo() esta bien)
y el "CONTROL GRID" es un ARRAY intermedio (físicamente debería estar donde mismo) pero la posición en el array
va a cambiar dependiendo del orden de tu indice.
A menos que le falte esa propiedad al GRID

------------------------------------------------------------------------------------------------------
If "CONTROL BROWSE" works for you, which is the reason for wanting to use the GRID CONTROL ???
The BROWSE works directly with the DB (hence, the RecNo () is fine)
and "CONTROL GRID" is an intermediate ARRAY (physically where it should be) but the position in the array
will change depending on the order of your index.
Unless lacks that property to GRID

Re: TREE control used as main menu - problems
Posted: Tue Sep 02, 2014 4:42 pm
by Javier Tovar
Hola asacaric,
aparentemente esta bien tu rutina, pero sería más claro que hicieras un demo minimo con el mal funcionamiento, de esa manera compilamos y probamos! y así es más rápida la ayuda
Saludos
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Hello asacaric,
apparently okay your routine, but you did would be clearer with a minimum demo malfunction, so that compile and test! and yes is faster aid: D
greetings
Re: TREE control used as main menu - problems
Posted: Tue Sep 02, 2014 4:49 pm
by asacaric
I thought that GRID control supersedes BROWSE, I don't know where I read this. And speed tests shows that GRID is faster than BROWSE.
Anyway, thanks to you, my friends, my project is growing every day. The core of this project will be used in other projects and I just want to make it right.
I want every single PRG to be like an object that can be included in another project. It's a bit harder at begining, but I think this is the right way.
At the end, I'll put my entire project here.
Re: TREE control used as main menu - problems
Posted: Tue Sep 02, 2014 4:50 pm
by Javier Tovar
También con Grid se puede manejar la DBF por eso tiene la clausula:
ROWSOURCE <cRowSource>] Y COLUMNFIELDS <acColumnFields>
A lo mejor hay algo raro por ahi!
Saludos
Re: TREE control used as main menu - problems
Posted: Tue Sep 02, 2014 4:56 pm
by Javier Tovar
asacaric wrote:I thought that GRID control supersedes BROWSE, I don't know where I read this. And speed tests shows that GRID is faster than BROWSE.
Claro que Grid esta remplazando a BROWSE, es más rápido, creo que nada más es cuestión de saberlo manejar, este control si ponemos unos parametros que manejamos con arrays cuando trabajamos con DBF si tiene un comportamiento extraño, pero si ponemos nada más los necesarios y en el orden de la definición del GRID, GRID es muy bueno!
Saludos
///////////////////////////////////////////////////////////////////
Sure BROWSE Grid is replacing, is faster, think anything else is a matter of knowing manage this control if we put a few parameters to handle with arrays when working with DBF has odd behavior, but if we needed anything else and in the order of definition of GRID, GRID is very good!
greetings
Jajaja ni cuenta me di, por la velocidad del GRID!!!

Re: TREE control used as main menu - problems
Posted: Tue Sep 02, 2014 5:11 pm
by andyglezl
Javier, parece que hiciste traducción del español al español y ya ves como es google...
Claro this Rejilla Que remplazando una BUSCA, es Más Rápido, Creo Que Nada más es Cuestión de saberlo manejar, de control this ponemos SI UNOS parametros Que manejamos estafa arrays CUANDO trabajamos estafa DBF si la ONU Tiene comportamiento extraño, Pero si ponemos Nada Mas los necesarios y en el Orden de la Definición del GRID, GRID es Muy bueno!
Re: TREE control used as main menu - problems
Posted: Tue Sep 02, 2014 5:14 pm
by Javier Tovar
andyglezl wrote:Javier, parece que hiciste traducción del español al español y ya ves como es google...
Jajaja ni cuenta me di por la velocidad del "GRID"

Re: TREE control used as main menu - problems
Posted: Tue Sep 02, 2014 5:15 pm
by asacaric
dedos rápidos, ha ha