ALLOWEDIT -- "syntax error at '@'"
Moderator: Rathinagiri
ALLOWEDIT -- "syntax error at '@'"
Hola
Al compilar un GRID con EDIT, funciona OK, pero al compilarlo con ALLOWEDIT, da error. ( "syntax error at '@' )
Es algun BUG ? HMG 3.4
----------------------------------------------------------------------------------------------------------------------------
Hello
When compiling a GRID with EDIT, it works OK, but when compiling with AllowEdit, fails. ( "syntax error at '@' )
It's a bug? HMG 3.4
@ <nRow> ,<nCol>
GRID <ControlName>
...
[ EDIT | ALLOWEDIT ] ] <====================
Veo que tambien dice que con EDIT abre una nueva ventana para editar los campos pero se edita en la linea.
y tambien los campos MEMO.
--------------------------------------------------------------------------------------------------------------------------------
I see also says that with EDIT opens a new window to edit the fields but is modified in each field on the line.
and also MEMO fields.
- Hints:
...
...
- If EDIT clause is used, by doubleclicking an item, will open an editing
window allowing to change the item content.
Al compilar un GRID con EDIT, funciona OK, pero al compilarlo con ALLOWEDIT, da error. ( "syntax error at '@' )
Es algun BUG ? HMG 3.4
----------------------------------------------------------------------------------------------------------------------------
Hello
When compiling a GRID with EDIT, it works OK, but when compiling with AllowEdit, fails. ( "syntax error at '@' )
It's a bug? HMG 3.4
@ <nRow> ,<nCol>
GRID <ControlName>
...
[ EDIT | ALLOWEDIT ] ] <====================
Veo que tambien dice que con EDIT abre una nueva ventana para editar los campos pero se edita en la linea.
y tambien los campos MEMO.
--------------------------------------------------------------------------------------------------------------------------------
I see also says that with EDIT opens a new window to edit the fields but is modified in each field on the line.
and also MEMO fields.
- Hints:
...
...
- If EDIT clause is used, by doubleclicking an item, will open an editing
window allowing to change the item content.
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
Re: ALLOWEDIT -- "syntax error at '@'"
I also tried it over here.
'EDIT' works 'ALLOWEDIT' generates an error.
The solution is simple (search replace) but i understand your point...
'EDIT' works 'ALLOWEDIT' generates an error.
The solution is simple (search replace) but i understand your point...
- serge_girard
- Posts: 3178
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: ALLOWEDIT -- "syntax error at '@'"
Andres,
Try with :
DEFINE GRID and ALLOWEDIT true of false
Serge
Try with :
DEFINE GRID and ALLOWEDIT true of false
Serge
There's nothing you can do that can't be done...
Re: ALLOWEDIT -- "syntax error at '@'"
Gracias trmpluym y Serge
Lo que estoy tratando de hacer, es cambiar los BROWSE que tengo en mis programas por el control GRID.
Pero no encuentro como hacer que el GRID funcione de la misma manera que el BROWSE.
Ademas de que estoy encontrando varios detalles que no se si son de la version 3.4 ó yo estoy
haciendo algo mal. (anexo ejemplo)
Alguien ya utilizo el GRID para editar DB como el BROWS ???
---------------------------------------------------------------------------------------------------------------------------
Thanks trmpluym and Serge
What I'm trying to do is change the BROWSE I have in my programs by the GRID control.
But I can not find how to make the GRID to work the same way as the BROWSE.
Besides I'm finding several details not if they are version 3.4 or I
doing something wrong. (Attached example)
Someone already use the GRID to edit DB as the BROWSE ???
Lo que estoy tratando de hacer, es cambiar los BROWSE que tengo en mis programas por el control GRID.
Pero no encuentro como hacer que el GRID funcione de la misma manera que el BROWSE.
Ademas de que estoy encontrando varios detalles que no se si son de la version 3.4 ó yo estoy
haciendo algo mal. (anexo ejemplo)
Alguien ya utilizo el GRID para editar DB como el BROWS ???
---------------------------------------------------------------------------------------------------------------------------
Thanks trmpluym and Serge
What I'm trying to do is change the BROWSE I have in my programs by the GRID control.
But I can not find how to make the GRID to work the same way as the BROWSE.
Besides I'm finding several details not if they are version 3.4 or I
doing something wrong. (Attached example)
Someone already use the GRID to edit DB as the BROWSE ???
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
Re: ALLOWEDIT -- "syntax error at '@'"
Hi Andy
View this code.
View this code.
Code: Select all
FUNCTION Modifica_DB( )
LOCAL nCpos := LEN( aCpos1 ), aReadOnly := ARRAY( nCpos ), afColor := ARRAY( nCpos ), aColCtrls := { }
AFILL( aReadOnly, .F. )
AFILL( afColor, fColor )
* aCpos, aTips, aLong, aDec
FOR i1 = 1 TO nCpos
IF aTips[ i1 ] = "N"
AADD( aColCtrls, { 'TEXTBOX', 'NUMERIC', '$ 9,999,999.99' } )
ELSEIF aTips[ i1 ] = "D"
AADD( aColCtrls, { 'DATEPICKER', 'DROPDOWN' } )
ELSEIF aTips[ i1 ] = "L"
AADD( aColCtrls, { 'CHECKBOX' , 'Yes' , 'No' } )
ELSEIF aTips[ i1 ] = "C"
AADD( aColCtrls, { 'TEXTBOX', 'CHARACTER' } )
[color=#FF0000] ELSEIF aTips[ i1 ] = "M"
AADD( aColCtrls, { 'EDITBOX' })[/color]
ENDIF
NEXT
DEFINE WINDOW Form_GridCtes AT 0 , 0 WIDTH 1024 HEIGHT 600 TITLE '| ABC CLIENTES |' ON RELEASE Form_Main.Restore BACKCOLOR { 0, 33, 38 }
@ 300 , 005 GRID Grid_2 OF Form_GridCtes WIDTH 1000 HEIGHT 250 FONT "VERDANA" SIZE 10 FONTCOLOR BLUE ;
ROWSOURCE "Ctes" VALUE 1 WIDTHS aLong HEADERS aCpos1 COLUMNFIELDS aCpos2 COLUMNCONTROLS aColCtrls ;
ON HEADCLICK { { || nil }, { || nil }, { || nil } } ;
EDIT ALLOWAPPEND ALLOWDELETE EDITOPTION GRID_EDIT_INSERTCHAR ;
DYNAMICBACKCOLOR afColor ;
[color=#FF0000]COLUMNWHEN { {|| .F. }, {|| .T. }, {|| .T. }, {|| .T. }, {|| .T. }, {|| .T. }, {|| .T. } } ;[/color]
TOOLTIP '<Doble Click>=Editar <ALT-A>=Añadir <SUP>=Borrar' LOCKCOLUMNS 2
Form_GridCtes.Grid_2.ToolTip := '<Doble Click>=Editar <ALT-A>=Añadir <SUP>=Borrar'
END WINDOW
CENTER WINDOW Form_GridCtes
ACTIVATE WINDOW Form_GridCtes
RETURN nil
[/code
-i use it replace command to save the modification
-is see it so the tooltip doesn't work perfectly in modal window, because the tooltip is behind the window
Best regards,
Gabor
Gabor
Re: ALLOWEDIT -- "syntax error at '@'"
Gracias por tu ayuda "mlnr"
* He instalado la version 3.42 (Patch 1 y 2) y sigue haciendo los detalles comentados dentro del .prg.
* FONTCOLOR en el BROWSE no funciona
* DYNAMICBACKCOLOR en el BROWSE no funciona
* LOCKCOLUMNS en el GRID no funciona
* ON SAVE en el GRID no funciona.
* En que momento se ejecuta el evento ON SAVE ??? cuando oprimo ENTER ???
* Al editar un campo MEMO en el GRID, lo edita en el mismo renglon, no abre una ventana como el BROWSE.
* En el GRID, no aparece la leyenda <MEMO> en la columna del campo memo.
* He quitado de la ventana Main "TOPMOST" el TOOLTIP si funciona OK. (pero quiero que sea TOPMOST)
------------------------------------------------------------------------------------------------------------------------------------------
Thanks for your help "mlnr"
* I installed the version 3.42 (Patch 1 and 2) and continues to the details discussed in the .prg.
* FONTCOLOR not work in the BROWSE
* DynamicBackColor not work in the BROWSE
* LockColumns in the GRID does not work
* SAVE ON in the GRID does not work
* At that time the event runs SAVE ON?, When I press ENTER?
* When editing a memo field in the GRID, you edit in the same row, does not open a window like the BROWSE.
* In the GRID, the legend <MEMO> column does not appear in the memo field.
* I removed the Main "TOPMOST", the TOOLTIP it works OK window. (But I want it to be TOPMOST)
* He instalado la version 3.42 (Patch 1 y 2) y sigue haciendo los detalles comentados dentro del .prg.
* FONTCOLOR en el BROWSE no funciona
* DYNAMICBACKCOLOR en el BROWSE no funciona
* LOCKCOLUMNS en el GRID no funciona
* ON SAVE en el GRID no funciona.
* En que momento se ejecuta el evento ON SAVE ??? cuando oprimo ENTER ???
* Al editar un campo MEMO en el GRID, lo edita en el mismo renglon, no abre una ventana como el BROWSE.
* En el GRID, no aparece la leyenda <MEMO> en la columna del campo memo.
* He quitado de la ventana Main "TOPMOST" el TOOLTIP si funciona OK. (pero quiero que sea TOPMOST)
------------------------------------------------------------------------------------------------------------------------------------------
Thanks for your help "mlnr"
* I installed the version 3.42 (Patch 1 and 2) and continues to the details discussed in the .prg.
* FONTCOLOR not work in the BROWSE
* DynamicBackColor not work in the BROWSE
* LockColumns in the GRID does not work
* SAVE ON in the GRID does not work
* At that time the event runs SAVE ON?, When I press ENTER?
* When editing a memo field in the GRID, you edit in the same row, does not open a window like the BROWSE.
* In the GRID, the legend <MEMO> column does not appear in the memo field.
* I removed the Main "TOPMOST", the TOOLTIP it works OK window. (But I want it to be TOPMOST)
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
Re: ALLOWEDIT -- "syntax error at '@'"
Hola
Con la propiedad "TOPMOST" en la ventana MAIN, comprobe otro detalle (ademas del "TOOLTIP") en la ventana MODAL, parece que no funciona
DoMethod( 'xxx', "xxx", "SetFocus" ) ya que el foco se queda en una ventana cualquiera, abierta anteriormente.
----------------------------------------------------------------------------------------------------------------------------------------------------------
Hello
With the "TOPMOST" property in the MAIN window, checked other details (besides the "TOOLTIP") in the modal window, it does not work
DoMethod ('Form_GridCtes', "Grid_2", "SetFocus") as the focus remains on any window, open before.
Con la propiedad "TOPMOST" en la ventana MAIN, comprobe otro detalle (ademas del "TOOLTIP") en la ventana MODAL, parece que no funciona
DoMethod( 'xxx', "xxx", "SetFocus" ) ya que el foco se queda en una ventana cualquiera, abierta anteriormente.
----------------------------------------------------------------------------------------------------------------------------------------------------------
Hello
With the "TOPMOST" property in the MAIN window, checked other details (besides the "TOOLTIP") in the modal window, it does not work
DoMethod ('Form_GridCtes', "Grid_2", "SetFocus") as the focus remains on any window, open before.
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: ALLOWEDIT -- "syntax error at '@'"
GRID with data base:
ALT + A --> Append
ALT + D --> Delete
ALT + R --> ReCall
ALT + S --> Save (On Save)
ALT + U --> ClearBuffer
ALT + A --> Append
ALT + D --> Delete
ALT + R --> ReCall
ALT + S --> Save (On Save)
ALT + U --> ClearBuffer
Code: Select all
FUNCTION GridOnSave( )
LOCAL k
FOR k = 1 TO HMG_LEN (This.EditBuffer) // Numbers of edit cell
MsgDebug( This.EditBuffer [ k ] ) // { nLogicalRow , nLogicalCol , xValue , nRecNo }
DbGoTo( This.EditBuffer [ k ][ 4 ] )
If RegEnRed( "Ctes" )
FIELDPUT( This.EditBuffer [ k ][ 2 ], This.EditBuffer [ k ][ 3 ] )
ELSE
MsgInfo("No se pudo grabar el Registro...","Verifique" )
ENDIF
UNLOCK
NEXT
RETURN NIL
Re: ALLOWEDIT -- "syntax error at '@'"
Muchas gracias Dr. Claudio, solucionado.
Que tan posible es que el control Grid tenga los eventos ON DELETE y ON APPEND ( como tenemos ON SAVE)
para personalizar mas el GRID ?
P.D. ( Ya parece Navidad, con tantos deseos ! )
Y tambien poder personalizar la edicion de los campos MEMO.
---------------------------------------------------------------------------------------------------------------------------
Thank you very much Dr. Claudio, solved.
How likely it is that the Grid control events have ON DELETE and ON APPEND (as we ON SAVE)
to further customize the GRID?
P.S. (Already seems Christmas, with many desires: )
And also to customize editing the MEMO fields.
Que tan posible es que el control Grid tenga los eventos ON DELETE y ON APPEND ( como tenemos ON SAVE)
para personalizar mas el GRID ?
P.D. ( Ya parece Navidad, con tantos deseos ! )
Y tambien poder personalizar la edicion de los campos MEMO.
---------------------------------------------------------------------------------------------------------------------------
Thank you very much Dr. Claudio, solved.
How likely it is that the Grid control events have ON DELETE and ON APPEND (as we ON SAVE)
to further customize the GRID?
P.S. (Already seems Christmas, with many desires: )
And also to customize editing the MEMO fields.
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.