[Gambas-user] DataView Help
T Lee Davidson
t.lee.davidson at gmail.com
Mon Jul 10 15:21:30 CEST 2023
On 7/10/23 06:40, Benoit Minisini wrote:
> Le 09/07/2023 à 21:19, T Lee Davidson a écrit :
>> 2. When a newly created record is saved with DataSource.Create, DataView improperly displays the updated table data by
>> duplicating the last record instead of showing the new (correctly saved) record.
> DataSource.Create() does not create a new record. It enters new record editing mode.
I didn't say anything about DataSource.Create creating a new record. The documentation states that it effects a save:
"Saves the data from the data controls and clears them afterwards."
>> 3. DataView.Update appears to do nothing. (I added a 'refresh' ToolButton to the form to explicitly test this.)
> DataView.Update() reloads the contents of the DataView. It's "update" from the database to the control, not the other way.
Yes, that is how I understood it. It doesn't work.
>> 4. The date chooser dialog presented in a DataControl for a date-based field automatically saves the record when it is closed.
>> It should not do so.
> I can't reproduce. If you have a DataControl pointing at a date field, the control is updated when the date chooser closes, but
> the record is not saved automatically.
The record is saved automatically in Gianluigi's project. Perhaps we need a version stripped down that isolates this.
>> Addendum: The image chooser dialog in a DataControl for an image-based field also causes an automatic save.
> There is no image chooser in a DataControl. I don't know what you are talking about.
Gianluigi answered that. More specifically, there is an ellipsis button presented when a DataControl handles a blob field.
Clicking that brings up a "Blob Contents" dialog with "Load", "Save", and "Clear" menu items. I don't know what it is called.
More information about the User