[Gambas-user] DataView Help

Gianluigi gradobag at gradobag.it
Tue Jul 11 11:45:40 CEST 2023


Il 11/07/23 01:54, Benoit Minisini ha scritto:
> Le 07/07/2023 à 17:26, Gianluigi a écrit :
>> Hi Benoit,
>>
>> in this (*) your response to Hans, to have more control over the 
>> data, you suggest the use of DataView and custom buttons.
>>
>> (*) 
>> https://lists.gambas-basic.org/pipermail/user/2022-August/076746.html
>>
>> For the past few days I have been trying to figure out how to insert 
>> new data (Minnie) into the project table that you can download at 
>> this link:
>>
>> https://paste.c-net.org/TrippPaolo
>>
>> (It weighs too much because of the presence of images).
>>
>> Can you kindly put me on the right track?
>>
>> I thank you for your attention and sorry for my ignorance
>>
>> Regards
>>
>> Gianluigi
>>
>
> The mess comes from your Form_Activate() event handler that is raised 
> each time the form is activated.
>
> It moves the DataSource cursor, and so always save the current record 
> when, for example, the calendar popup closes
>
> What should do the code in Form_Activate(), and why?
>
Hi Benoit,

As usual, in fact it seemed impossible for me to be right, I am an idiot.
The code (hoping it's correct) is only for opening so I can select the 
first line.
I moved it to Form_Open and it seems to work fine.

I apologize for the late reply, I wanted to complete the project you 
find here ( https://paste.c-net.org/ConfirmMarches ), unfortunately two 
issues remain:

1- Most important, I can't figure out how to get the saved record row so 
that I can select it after saving.

2- I have not figured out how to do why Stop Event in BeforeSave does 
not also delete the data already entered.

As usual you write great code, the idiot who does not understand it is me.

Waiting for kind feedback, I thank you for the valuable suggestion.

Regards

Gianluigi



More information about the User mailing list