Data update problem

I am useing a TTIWDBAdvWebGrid connected to a datasource.  The datasource is linked to a TIBCQuery located in the UserSession form.  The grid has 7 columns of which only 2 columns are editable. Both those columns have ColumnType = ctNormal, DynEditor = deText and Editor = edEditNumeric. The grid MouseSelect property is set to msEdit.

I can click on the edit columns and enter a value and then move to other rows but the database is not updated (in a DBAware grid, simply moving to another row will post the data but things must be different in the IntraWeb world). I've been looking at your examples but can't seem to find any clues. Can someone please tell me what I'm missing here.
 
Thanks in advance
 
Bill Zwirs

For dyn edits, the dataset is not auto-updated (because this dyn edit mode allows for multiple records to be edited at once while a dataset is per record editing)  For the normal inplace editors, with per record set in edit mode, this should work automatically. See the features demo.

Bruno,

 
I don't fully understand your answer.  I have the two editable columns set the same as in your DBGrid demo (part of the features demo) so I assume that uses the normal inplace editors. The only thing I don't have is a navigator......I have tried this but when I click edit and enter a value, then, whether I select next row or post button on the navigator, the values are reset to zero and nothing is posted to the database.  Maybe I'm looking at the wrong example in the features demo?
 
Sorry to be a nuisance but some more assistance would be appreciated.
 
regards
 
Bill Zwirs
  • When using direct edit (MouseSelect = msEdit) updates are not automatically posted to the database.
    In this case you should manually update the cell values to the database using, for example, the IWAdvWebGrid.OnAsyncEditDone event or an external IWButton.OnClick event.

    - When using a Navigator or a ctDataButton grid column, cell values should be automatically updated when doing a post.

    If the problem persists, please let me know which version of IntraWeb you are using and I'll provide a sample project.

    Bart Holvoet2012-05-15 06:05:29

Intraweb 12.1.27.  An example would be very helpfull.

 
Thank you for your assistance.
 
regards
 
Bill Zwirs

I've prepared two examples:


- Default Edit: with a ctDataButton column, database is updated with changes automatically on post
download: http://www.tmssoftware.net/public/DBGrid_ADO_DefaultEdit.zip
- Direct Edit: with MouseSelect set to msEdit, database is updated programmatically in the OnAsyncEditDone event
download: http://www.tmssoftware.net/public/DBGrid_ADO_DirectEdit.zip

a small segnalation : 

your last demo, "
OnAsyncEditDone " in my XE with intra 11 doesn't work.... 
it set te value not for current row, but for another one ... maybe first, but not always ... =O
and when you scroll, current select row value change to scrolled new one... ;)

An improved version of the DirectEdit sample can be downloaded from here: http://www.tmssoftware.net/public/DBGrid_ADO_DirectEdit2.zip

Thanks Bart.  That works good for me now.  Much appreciated.

 
regards
 
Bill Zwirs