Dynamic GRID 2

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Dynamic GRID 2

Post by srvet_claudio »

I have improved the functions of the previous Dynamic_Grid.prg.
I added several methods and properties that make the implementation of the code is more general than previous routines Dynamic_Grid one.
I hope you find it useful.
Best regards,
Claudio Soto

Code: Select all

// DESCRIPTION
*******************************************************************************
* DYNAMIC_GRID_2.PRG 
* Modification of a GRID control at runtime: 
*    # INSERT different types of COLUMNS (NUMERIC,CHARACTER,DATEPICKER,COMBOBOX,SPINNER,CHECKBOX, etc.)
*    # DELETE and MOVE columns and rows
*    # CHANGE specific COLUMN CONTROL.
*    # INSERT background IMAGE in Grid
*******************************************************************************


// #include: GRID_CONTROLS_EX.prg
**********************************************************************************
* GRID_ColumnCount         ---> Return the Number of Column on GRID
*
* GRID_AddColumnEx         ---> Complement of Method:  AddColumn (nColIndex)
* GRID_DeleteColumnEx      ---> Complement of Method:  DeleteColumn (nColIndex)
*
* GRID_GetColumnControlsEx ---> Return Array with Controls of Column(nColIndex) ==> {cCAPTION, nWIDTH, nJUSTIFY, aCOLUMNCONTROL, bDYNAMICBACKCOLOR, bDYNAMICFORECOLOR, bCOLUMNWHEN, bCOLUMNVALID, bONHEADCLICK}
*
* GRID_GetColumnControl    ---> Return specific Control of Column(nColIndex) ==> [cCAPTION, nWIDTH, nJUSTIFY, aCOLUMNCONTROL, bDYNAMICBACKCOLOR, bDYNAMICFORECOLOR, bCOLUMNWHEN, bCOLUMNVALID, bONHEADCLICK]
* GRID_SetColumnControl    ---> Set specific Control of Column(nColIndex)    ==> [cCAPTION, nWIDTH, nJUSTIFY, aCOLUMNCONTROL, bDYNAMICBACKCOLOR, bDYNAMICFORECOLOR, bCOLUMNWHEN, bCOLUMNVALID, bONHEADCLICK]
*
* GRID_GetColumnDisplayPos ---> Get the position of Column(nColIndex) in that display in the GRID
* GRID_SetColumnDisplayPos ---> Set the position of Column(nColIndex) in that display in the GRID
*
* GRID_GetColumnWidthDisplay -> Get the Width of Column(nColIndex) in that display in the GRID
*
* GRID_SetBkImage          ---> Set background image in Grid
**********************************************************************************


// #include: ARRAY_FUNC.prg
*******************************************************************************
* ARRAY_CHANGE (nAction, aData, nIndex, [nPos | DataAdd])      --> Move/Add/Remove: COLUMN or ROW in Array 
* ARRAY_GRID   (cControlName, cParentForm, nAction, aGridData) --> Get/Add: data in GRID 
*******************************************************************************
Attachments
Dynamic_GRID_2.rar
(274.16 KiB) Downloaded 598 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Dynamic GRID 2

Post by esgici »

Thanks a lot Dr. :)

Very useful and informative, indeed :arrow:

Saludos
Viva INTERNATIONAL HMG :D
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Dynamic GRID 2

Post by danielmaximiliano »

Hola Claudio :
muy buena aplicacion, gracias por compartir.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Dynamic GRID 2

Post by srvet_claudio »

Gracias Esgici y Daniel.
Saludos,
Claudio
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: Dynamic GRID 2

Post by luisvasquezcl »

Claudio,
excelente demo.
gracias por tu aporte.
Saludos cordiales,
Luis Vasquez.
User avatar
Galloper
Posts: 16
Joined: Sun Oct 30, 2011 12:25 pm

Re: Dynamic GRID 2

Post by Galloper »

Gracias, Claudio.

Nos va muy bien a los que estamos entrando en HMG.

Buen ejemplo.

José ( Galloper )
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Dynamic GRID 2

Post by srvet_claudio »

Gracias Luis y José.
Saludos,
Claudio
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Dynamic GRID 2

Post by Rathinagiri »

Very good. :idea:
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Dynamic GRID 2

Post by srvet_claudio »

Thanks Rathinagiri.
Regards,
Claudio
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Dynamic GRID 2

Post by srvet_claudio »

Hi all.
I corrected a small bug in the lines 144 and 295 of file GRID_CONTROLS_EX.prg
I'm sorry :oops:
Regards,
Claudio
Attachments
Dynamic_GRID_2b.rar
(273.97 KiB) Downloaded 551 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
Post Reply