EDIT INPLACE from GRID

80 views
Skip to first unread message

Gilbert Vaillancourt

unread,
May 20, 2026, 2:25:45 PM (10 days ago) May 20
to Harbour Minigui
Hi All,

I need to automatically enter the edit mode of a field when I insert a new element to my grid, without having the user to DBLCLICK on the new element. Is there a way I can do this.
I tried to use _GridInplaceEdit(), but I always get an error when calling the function.

Regards
Gilbert


Grigory Filatov

unread,
May 21, 2026, 9:59:22 AM (10 days ago) May 21
to Harbour Minigui
Hi Gilbert,

Thank you for your request.

Please review the following working example.

/*
* MiniGUI Grid Demo
*/

#include "minigui.ch"

Function Main

Local aRows [40] [3]

DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 640 ;
HEIGHT 400 ;
TITLE 'Cell Navigation Grid Test' ;
MAIN

DEFINE MAIN MENU
DEFINE POPUP 'File'
MENUITEM 'AddItem' ACTION ( Form_1.Grid_1.AddItem({'X','X','X'}), SetProperty("Form_1","Grid_1", 'Value', {Form_1.Grid_1.ItemCount, 1}), InsertReturn() )
MENUITEM 'Delete All Items' ACTION Form_1.Grid_1.DeleteAllItems
END POPUP
END MENU

aRows [1] := {'Simpson','Homer','555-5555'}
aRows [2] := {'Mulder','Fox','324-6432'}
aRows [3] := {'Smart','Max','432-5892'}
aRows [4] := {'Grillo','Pepe','894-2332'}
aRows [5] := {'Kirk','James','346-9873'}
aRows [6] := {'Barriga','Carlos','394-9654'}
aRows [7] := {'Flanders','Ned','435-3211'}
aRows [8] := {'Smith','John','123-1234'}
aRows [9] := {'Pedemonti','Flavio','000-0000'}
aRows [10] := {'Gomez','Juan','583-4832'}

aRows [11] := {'Fernandez','Raul','321-4332'}
aRows [12] := {'Borges','Javier','326-9430'}
aRows [13] := {'Alvarez','Alberto','543-7898'}
aRows [14] := {'Gonzalez','Ambo','437-8473'}
aRows [15] := {'Batistuta','Gol','485-2843'}
aRows [16] := {'Vinazzi','Amigo','394-5983'}
aRows [17] := {'Pedemonti','Flavio','534-7984'}
aRows [18] := {'Samarbide','Armando','854-7873'}
aRows [19] := {'Pradon','Alejandra','???-????'}
aRows [20] := {'Reyes','Monica','432-5836'}

aRows [21] := {'Fernandez','Raul','321-4332'}
aRows [22] := {'Borges','Javier','326-9430'}
aRows [23] := {'Alvarez','Alberto','543-7898'}
aRows [24] := {'Gonzalez','Ambo','437-8473'}
aRows [25] := {'Batistuta','Gol','485-2843'}
aRows [26] := {'Vinazzi','Amigo','394-5983'}
aRows [27] := {'Pedemonti','Flavio','534-7984'}
aRows [28] := {'Samarbide','Armando','854-7873'}
aRows [29] := {'Pradon','Alejandra','???-????'}
aRows [30] := {'Reyes','Monica','432-5836'}

aRows [31] := {'Fernandez','Raul','321-4332'}
aRows [32] := {'Borges','Javier','326-9430'}
aRows [33] := {'Alvarez','Alberto','543-7898'}
aRows [34] := {'Gonzalez','Ambo','437-8473'}
aRows [35] := {'Batistuta','Gol','485-2843'}
aRows [36] := {'Vinazzi','Amigo','394-5983'}
aRows [37] := {'Pedemonti','Flavio','534-7984'}
aRows [38] := {'Samarbide','Armando','854-7873'}
aRows [39] := {'Pradon','Alejandra','???-????'}
aRows [40] := {'Reyes','Monica','432-5836'}

@ 10,10 GRID Grid_1 ;
WIDTH 500 ;
HEIGHT 322 ;
HEADERS {'Column 1','Column 2','Column 3'} ;
WIDTHS {100,100,100} ;
ITEMS aRows ;
VALUE 1 ;
EDIT INPLACE {} ;
CELLNAVIGATION

END WINDOW

Form_1.Grid_1.Setfocus

CENTER WINDOW Form_1

ACTIVATE WINDOW Form_1

Return Nil

HTH,
Grigory

среда, 20 мая 2026 г. в 20:25:45 UTC+2, gilbert.vai...@gmail.com:

Gilbert Vaillancourt

unread,
May 21, 2026, 1:41:45 PM (10 days ago) May 21
to Harbour Minigui
Thanks Grigory,

It solved my first problem.
But I have more restrictions to solve.
In the same grid I also need to disable editing of the first column.
I have tried using :
     INPLACE { {}, {"TEXTBOX", "CHARACTER"}, {"TEXTBOX", "CHARACTER", "999-9999"} }
but it does'nt change anything. The first column still editable

Regards
Gilbert
Reply all
Reply to author
Forward
0 new messages