Dynamic GRID

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
srvet_claudio
Posts: 1948
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 30 times
Been thanked: 119 times
Contact:

Dynamic GRID

Post by srvet_claudio » Wed Aug 08, 2012 10:12 pm

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 487 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

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

Post by esgici » Wed Aug 08, 2012 10:31 pm

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 » Thu Aug 09, 2012 12:56 am

Gracias Clauido!

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

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

Post by Rathinagiri » Thu Aug 09, 2012 2:36 am

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: 1948
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 30 times
Been thanked: 119 times
Contact:

Post by srvet_claudio » Thu Aug 09, 2012 1:09 pm

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: 2038
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 84 times
Been thanked: 11 times
Contact:

Post by danielmaximiliano » Thu Aug 09, 2012 3:27 pm

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

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. : +54901169026142
Telegram Name : DaNiElMaXiMiLiAnO

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

Post by esgici » Thu Aug 09, 2012 4:02 pm

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: 1948
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 30 times
Been thanked: 119 times
Contact:

Post by srvet_claudio » Thu Aug 09, 2012 5:05 pm

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

User avatar
luisvasquezcl
Posts: 1025
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 11 times
Been thanked: 14 times
Contact:

Post by luisvasquezcl » Thu Aug 09, 2012 7:21 pm

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

User avatar
srvet_claudio
Posts: 1948
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 30 times
Been thanked: 119 times
Contact:

Post by srvet_claudio » Fri Aug 10, 2012 11:14 am

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

Post Reply