Datagrid: Edit row, save to database

Pascal Lehner tate83 at gmail.com
Thu Aug 29 04:30:02 EDT 2013


Thanks Björnke, I somehow missed those two articles.
Works exactly as hoped, especially in combination with several of those:

*set* the dgColumnIsEditable["IngrCurrency"] of *group* "GridIngredients" to
false
Best regards,
Pascal


On 29 August 2013 00:48, Björnke von Gierke <bvg at mac.com> wrote:

> sure, i suggest you check out the lessons, mosg dg stuff is documented
> there:
>
> http://lessons.runrev.com/m/datagrid
>
> for example:
>
> http://lessons.runrev.com/s/lessons/m/datagrid/l/7314-how-do-i-add-a-row-of-data-to-an-existing-data-grid
> or:
>
> http://lessons.runrev.com/s/lessons/m/datagrid/l/7337-how-do-i-save-changes-the-user-makes-in-an-editor-field-to-an-external-data-source
>
> On 28.08.2013, at 13:53, Pascal Lehner wrote:
>
> > Hi all,
> >
> > Sitting in the Indian sun and writing on my hobby project. (Sorry for
> > that.. ;-)
> > Couldn't be better if there wasn't that one thing I cannot figure out
> just
> > now.
> >
> > I load data from several tables (main table: ingredients) from a a SQLite
> > database into a data grid.
> >
> > Now I wan't to provide an option to edit such displayed rows within the
> > data grid. The user should be able to click on a certain field and then
> > edit it however he wishes. When clicking save (or upon exiting this
> field),
> > these data should be saved back to the database. Kinda like Excel can do.
> > Also, there is fields where he should be able to chose from a drop-down
> > menu (like 'categories') since these are linked tables and I only store
> the
> > index no in the 'ingredients table'.
> >
> > Similarly, I wan't to provide an option to add new rows but I think
> that's
> > going to be a similar command/code.
> >
> > Is there an easy way to do that?
> > If not, I might just display several fields with the data for him to edit
> > below the grid but that probably isn't what a user expects from such a
> > datagrid..
> >
> > Thanks in advance.
> >
> > Best regards,
> >
> > Pascal
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> --
>
> Use an alternative Dictionary viewer:
> http://bjoernke.com/bvgdocu/
>
> Chat with other RunRev developers:
> http://bjoernke.com/chatrev/
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list