Page 1 of 2

Dynamic GRID 2

Posted: Fri Aug 17, 2012 4:35 am
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 
*******************************************************************************

Re: Dynamic GRID 2

Posted: Fri Aug 17, 2012 9:06 am
by esgici
Thanks a lot Dr. :)

Very useful and informative, indeed :arrow:

Saludos

Re: Dynamic GRID 2

Posted: Fri Aug 17, 2012 12:16 pm
by danielmaximiliano
Hola Claudio :
muy buena aplicacion, gracias por compartir.

Re: Dynamic GRID 2

Posted: Fri Aug 17, 2012 5:49 pm
by srvet_claudio
Gracias Esgici y Daniel.
Saludos,
Claudio

Re: Dynamic GRID 2

Posted: Fri Aug 17, 2012 7:16 pm
by luisvasquezcl
Claudio,
excelente demo.
gracias por tu aporte.
Saludos cordiales,
Luis Vasquez.

Re: Dynamic GRID 2

Posted: Fri Aug 17, 2012 7:34 pm
by Galloper
Gracias, Claudio.

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

Buen ejemplo.

José ( Galloper )

Re: Dynamic GRID 2

Posted: Fri Aug 17, 2012 9:28 pm
by srvet_claudio
Gracias Luis y José.
Saludos,
Claudio

Re: Dynamic GRID 2

Posted: Sat Aug 18, 2012 3:44 am
by Rathinagiri
Very good. :idea:

Re: Dynamic GRID 2

Posted: Sat Aug 18, 2012 1:44 pm
by srvet_claudio
Thanks Rathinagiri.
Regards,
Claudio

Re: Dynamic GRID 2

Posted: Sat Aug 18, 2012 9:15 pm
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