Page 1 of 1
XBROWSE lFastEdit in some columns
Posted: Wed Apr 02, 2025 8:12 am
by MarcoBoschi
Hi is it possible to set only for some columns lFastedit?
Actually I set only in this way but oBrw:lFastEdit = .T. this piece of code set all columns. My desire is to have some columns not editable and other editable
Many Thanks
Re: XBROWSE lFastEdit in some columns
Posted: Wed Apr 02, 2025 12:12 pm
by MGA
try
oBrw:aCols[1]:nEditType := EDIT_NONE
Re: XBROWSE lFastEdit in some columns
Posted: Wed Apr 02, 2025 2:54 pm
by MarcoBoschi
Yes but is not exactly what I desire. I want to set some colunns as oCol:nEditType = EDIT_GET and a only few of these also lFastEdit
In the guide I see "If true, editable columns go to edit mode just pushing an alpha or digit character. This feature is incompatible with Incremental seek and is only available when the marquee style is cell based.
Re: XBROWSE lFastEdit in some columns
Posted: Thu Apr 03, 2025 5:50 am
by cnavarro
Marco, I'm not sure I fully understand your approach and objective.
Wouldn't it be more appropriate to configure lFastEdit := .F., and configure oCol:nEditType only on the editable columns?
Re: XBROWSE lFastEdit in some columns
Posted: Thu Apr 03, 2025 6:34 am
by MarcoBoschi
IF oBrw:lFastEdit = .F. and a column is oCol:nEditType = EDIT_GET I have to press Enter to modify the value
of the column
IF oBrw:lFastEdit = .T. and a column is always oCol:nEditType = EDIT_GET
IF I press alpha or digit characters I can modify the value of the column
For some columns I want this behavior but only for some not all of them
I've tried oCol:lFastEdit = .T. unsuccessful
Re: XBROWSE lFastEdit in some columns
Posted: Thu Apr 03, 2025 10:11 am
by cnavarro
Ok, try this sample, and tell me if it's what you need
Code: Select all | Expand
#include "fivewin.ch"
FUNCTION Main()
LOCAL i
REQUEST DBFCDX
RddSetDefault( "DBFCDX" )
set DATE FRENCH
SET CENTURY ON
SET EPOCH TO Year( Date() ) - 40
// Please change path
USE d:\fwh\fwhteam\samples\customer NEW SHARED
XBROWSER "customer" TITLE "Prueba Botones y Excel" SETUP ;
( oBrw:lFastEdit := .F., ;
oBrw:aCols[ 1 ]:nEditType := oBrw:aCols[ 3 ]:nEditType := EDIT_GET, ;
oBrw:bKeyChar := { | nKey, nFlags, oB, oCol | if( oCol:nEditType == 0, nil, ;
if( oCol:lEditable .and. oCol:IsEditKey( nKey ), oCol:Edit( nKey ), ) ) } ;
)
RETURN nil
Re: XBROWSE lFastEdit in some columns
Posted: Thu Apr 03, 2025 2:28 pm
by MarcoBoschi
Many thanks it's very very interesting
