Dynamic GRID

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 2111
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 48 times
Been thanked: 223 times
Contact:

Dynamic GRID

Post by srvet_claudio »

Hi all.
I developed an example of a dynamic GRID control.
I hope it is useful.

Code: Select all


// DESCRIPTION
*******************************************************************************
* DYNAMIC_GRID.PRG 
* Illustrates the modification of a GRID control at runtime: 
* Insert different types of columns (NUMERIC,CHARACTER,DATEPICKER,COMBOBOX,SPINNER,CHECKBOX)
* and Delete and Move columns.
*******************************************************************************


// PROCEDURES/FUNCTIONS
**********************************************************************************
* GRID_AddColumnEx         ---> Complement of Method:  cParentForm.cControlName.AddColumn ([nColIndex], [cCaption], [nWidth], [nJustify])
* GRID_DeleteColumnEx      ---> Complement of Method:  cParentForm.cControlName.DeleteColumn (nColIndex)
* GRID_ColumnCount         ---> Return the Number of Column on GRID
* GRID_GetColumnControlsEx ---> Return Array with Controls of Column(nColIndex) ==> {aCOLUMNCONTROL, bDYNAMICBACKCOLOR, bDYNAMICFORECOLOR, bCOLUMNWHEN, bCOLUMNVALID, bONHEADCLICK}
**********************************************************************************

// SYNTAX
**********************************************************************************
* GRID_AddColumnEx (cControlName, [cParentForm], nColIndex, [aCOLUMNCONTROL], [bDYNAMICBACKCOLOR], [bDYNAMICFORECOLOR], [bCOLUMNWHEN], [bCOLUMNVALID], [bONHEADCLICK])
* GRID_DeleteColumnEx (cControlName, [cParentForm], nColIndex)
* GRID_ColumnCount (cControlName , [cParentForm])
* GRID_GetColumnControlsEx (cControlName, [cParentForm], nColIndex)
**********************************************************************************
It's only an idea: :idea:
for future versions of HMG, in GRID control: extend the number of controls in ADD / DELETE COLUMN (aCOLUMNCONTROL, bDYNAMICBACKCOLOR, bDYNAMICFORECOLOR, bCOLUMNWHEN, bCOLUMNVALID, bONHEADCLICK, etc.) and implement the property COLUMNCOUNT.

Best Regards,
Claudio Soto.
Attachments
Dynamic_GRID.rar
(4.23 KiB) Downloaded 739 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
esgici
Posts: 4537
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 409 times
Been thanked: 118 times
Contact:

Post by esgici »

srvet_claudio wrote: I developed an example of a dynamic GRID control.
I hope it is useful.
Thanks Dr.

Surely it's your another good work :)

I'll try it :arrow:

Regards

--
Viva INTERNATIONAL HMG :D

User avatar
fchirico
Posts: 324
Joined: Sat Aug 23, 2008 11:27 pm
Location: Argentina

Post by fchirico »

Gracias Clauido!

Excelente, muy didáctico y práctico de aplicar.
Saludos, Fernando Chirico.

User avatar
Rathinagiri
Posts: 5321
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 198 times
Been thanked: 210 times
Contact:

Post by Rathinagiri »

Wow! Great work. It can be readily used in many of my programs. Thanks a lot.

We can add it to the HMG source too.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
srvet_claudio
Posts: 2111
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 48 times
Been thanked: 223 times
Contact:

Post by srvet_claudio »

Hi Esgici, Fernando and Rathinagiri.
Many thanks for your words. :D
Best regards,
Claudio
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
danielmaximiliano
Posts: 2357
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 433 times
Been thanked: 83 times
Contact:

Post by danielmaximiliano »

srvet_claudio wrote:Hi Esgici, Fernando and Rathinagiri.
Many thanks for your words. :D
Best regards,
Claudio
Gracias Claudio por compartir sus conocimientos.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO

User avatar
esgici
Posts: 4537
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 409 times
Been thanked: 118 times
Contact:

Post by esgici »

rathinagiri wrote:We can add it to the HMG source too.
This will be very good.

Thanks in advance :)

--
Viva INTERNATIONAL HMG :D

User avatar
srvet_claudio
Posts: 2111
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 48 times
Been thanked: 223 times
Contact:

Post by srvet_claudio »

Como siempre, muchas gracias Daniel. :D
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
luisvasquezcl
Posts: 1183
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 16 times
Been thanked: 18 times
Contact:

Post by luisvasquezcl »

Gracias Claudio,
como siempre un gran aporte
Saludos cordiales,
Luis Vasquez

User avatar
srvet_claudio
Posts: 2111
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 48 times
Been thanked: 223 times
Contact:

Post by srvet_claudio »

Gracias Luis.
Saludos,
Claudio
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

Post Reply