Page 1 of 2

Dynamic GRID

Posted: Wed Aug 08, 2012 10:12 pm
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.

Re: Dynamic GRID

Posted: Wed Aug 08, 2012 10:31 pm
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

--

Re: Dynamic GRID

Posted: Thu Aug 09, 2012 12:56 am
by fchirico
Gracias Clauido!

Excelente, muy didáctico y práctico de aplicar.

Re: Dynamic GRID

Posted: Thu Aug 09, 2012 2:36 am
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.

Re: Dynamic GRID

Posted: Thu Aug 09, 2012 1:09 pm
by srvet_claudio
Hi Esgici, Fernando and Rathinagiri.
Many thanks for your words. :D
Best regards,
Claudio

Re: Dynamic GRID

Posted: Thu Aug 09, 2012 3:27 pm
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.

Re: Dynamic GRID

Posted: Thu Aug 09, 2012 4:02 pm
by esgici
rathinagiri wrote:We can add it to the HMG source too.
This will be very good.

Thanks in advance :)

--

Re: Dynamic GRID

Posted: Thu Aug 09, 2012 5:05 pm
by srvet_claudio
Como siempre, muchas gracias Daniel. :D

Re: Dynamic GRID

Posted: Thu Aug 09, 2012 7:21 pm
by luisvasquezcl
Gracias Claudio,
como siempre un gran aporte
Saludos cordiales,
Luis Vasquez

Re: Dynamic GRID

Posted: Fri Aug 10, 2012 11:14 am
by srvet_claudio
Gracias Luis.
Saludos,
Claudio