Grid Virtual

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
luisvasquezcl
Posts: 1263
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Grid Virtual

Post by luisvasquezcl »

Hola colegas,
Veo un comportamiento distinto entre un grid normal y uno virtual.
Cuando uno define los controles para edicion los campos numéricos que tienen asociado un control combobox muestran un valor del arreglo cuando no estas editando la linea, por ejemplo si tengo en el arreglo del combobox con los valores {"Si","No"} y el valor del campo es 1 debería mostrar si, en cambio me muestra el valor 1 y asi también sucede con el checkbox.
Eso es normal o estoy haciendo algo incorrecto.
Adjunto ejemplo.
Agradezco de antemano su ayuda.
Saludos cordiales,
Luis Vasquez

Hi colleagues,
I see a different behavior between a normal and a virtual grid.
When you set the controls for editing numeric fields associated with a combobox control show an array value when you're not editing the line, for example if I have combobox in the array with the values ​​{"Yes", "No"} and the field value is 1 should show whether instead it shows me the value 1 and so it is with the checkbox.
Is that normal or am I doing something wrong.
Attached example.
Thank you in advance for your help.
Best regards,
Attachments
demo.zip
(1.23 KiB) Downloaded 258 times
User avatar
gfilatov
Posts: 1116
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Grid Virtual

Post by gfilatov »

luisvasquezcl wrote:...
Hi colleagues,
I see a different behavior between a normal and a virtual grid.
When you set the controls for editing numeric fields associated with a combobox control show an array value when you're not editing the line, for example if I have combobox in the array with the values ​​{"Yes", "No"} and the field value is 1 should show whether instead it shows me the value 1 and so it is with the checkbox.
Is that normal or am I doing something wrong.
Attached example.
Thank you in advance for your help.
Hello Luis,

You are right ;)

The reason is that the method of reception of value in the aboved grids is different:
- normal grid receive a value from the function _GetItem() which have formatting of value;
- virtual grid receive a value from the function _GetIVirtualItem() which have not a such formatting.

Thanks for your sample :!:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
luisvasquezcl
Posts: 1263
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: Grid Virtual

Post by luisvasquezcl »

Grigory Thanks for your reply.
Best regards,
Luis Vasquez.
User avatar
danielmaximiliano
Posts: 2763
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: Grid Virtual

Post by danielmaximiliano »

Hola Luis :
yo me rompi un rato el coco, :geek: ,
leyendo despues HMG Reference me encontre que Virtual Grid es solo en tiempo de DEFINICIóN
- Name (R)

- Virtual (D)

- Parent (D)

- Widths (D)

- MultiSelect (D)

- NoLines (D)

- Image (D)

- Justify (D)

- HelpId (D)

- Break (D)

- AllowEdit (D)

- ColumnControls (D)

- ColumnValid (D)

- Headers (D)

- CellNavigation (D)

- Items (D)

- Image (D)

- Items (D)

- LockColumns (D)



D: Available at control definition only

R: Read-Only
asi que

Code: Select all

define GRID Grid_1
		Row 10
		col 10
		WIDTH 400 
		HEIGHT 330 
		items aElem
		HEADERS {'Fecha','Numero','Texto','Logico','Numero'} 
		WIDTHS  {100    ,100     ,140    , 100    , 100}
		COLUMNCONTROLS {{'DATEPICKER','DROPDOWN'},;
						{'TEXTBOX','NUMERIC'  },;
						{'TEXTBOX','CHARACTER'},;
						{'CHECKBOX',"Si","No" },;
						{'COMBOBOX',{'Uno','Dos','Tres'}} }
		ITEMCOUNT 1000
		TOOLTIP 'Grid Virtual'
		end grid
Funciona con el codigo que preparaste.

PD: yo tamb no lo tenia en cuenta
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
User avatar
luisvasquezcl
Posts: 1263
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: Grid Virtual

Post by luisvasquezcl »

Hola Maximiliano.
Realmente el grid virtual es muy rápido para cargar datos.
Lamentablemente la documentación no es muy explicita y no había mucha difusión sobre esta cualidad del control por lo que no lo había usado nunca.
Ahora me encuentro con que tiene algunos detalles pero creo que solucionaré el problema con lo que hay.
Estoy haciendo pruebas y subiré el ejemplo cuando lo tenga terminado. Trataré de ponerle el máximo de utilidades para que sea de ayuda para otros que esten interesados.
Saludos cordiales,
Luis Vasquez
User avatar
danielmaximiliano
Posts: 2763
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: Grid Virtual

Post by danielmaximiliano »

Luis:
Que bueno que hayas probado la diferencia entre los 2 Controles Grid, y te haya gustado la velocidad del mismo
cuando tengas los ejemplos los voy a mirar, hasta ahora va muy bien el Grid en mi aplicacion, yo necesariamente necesito velocidad en las lecturas de las tablas en red para busquedas de alguna informacion.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
User avatar
luisvasquezcl
Posts: 1263
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: Grid Virtual

Post by luisvasquezcl »

Hola Maximiliano,
Subi el demo en la carpeta Samples.
Es realmente sorprendente la velocidad del control virtual.
Aun no encontré la forma de que muestre los datos como el grid normal pero seguiré investigando.
Espero te sea de utilidad.
Saludos cordiales,
Luis Vasquez.
User avatar
danielmaximiliano
Posts: 2763
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: Grid Virtual

Post by danielmaximiliano »

Cuales datos Luis ?

Tu ejemplo funciona cambiando

Code: Select all

@10, 10 GRID Grid_1
por

Code: Select all

define GRID Grid_1
Hello World!_2011-10-25_17-14-10.png
Hello World!_2011-10-25_17-14-10.png (37.6 KiB) Viewed 3553 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Telegram invitation https://t.me/HMGWorkspace
User avatar
luisvasquezcl
Posts: 1263
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: Grid Virtual

Post by luisvasquezcl »

Hola Maximiliano,
me sorprendiste .... :lol:, el codigo que tome es de los samples de HMG3039 grid02.
Se supone que la forma de construcciòn del control no debe producir ninguna diferencia.
Incluso Grigory me confirmo que era asi, algo estas agregando que no toma el grid virtual o definitivamente esto es algo que ni los gurus de hmg/minigui se esperaban...
voy a probar enseguida a ver si es cierto ...
saludos cordiales,
Luis Vasquez
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Grid - BREAK ?

Post by Pablo César »

danielmaximiliano wrote:
- Name (R)

- Virtual (D)

- Parent (D)

- Widths (D)

- MultiSelect (D)

- NoLines (D)

- Image (D)

- Justify (D)

- HelpId (D)

- Break (D)

..//..
Para que es usado el BREAK en GRIDs ?
What BREAK It is used for ? In Grids, someone can tell us ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply