Page 1 of 1

Datagrid - get input field data

Posted: Wed Feb 16, 2011 3:22 pm
by thierryPHILM
Hi there,

Currently learning and following the datgrid Rev lesson online (great stuff thanks !) I still wondering how to use a standard input txt field in a datagrid. (Dont want to use the built-in "Allow text editing" or "Row highlite feature"). Well I think that using datagrid to manage forms with standard components (txt inputs, checkboxes etc) seems easier to design that using a UI grp with the same components.
You can see a UI example of my test stack to make it clear : (www) philmeurope (com) /downloads/Datagrid_forms_inputFields.png

Even after the interesting "Checkbox usage in datagrid" example, I cannot find a solution to update the datagrid array once an input field has been modified. The way to update the datagrid values using the checkbox is based on a on mouseDoubleUp pMouseBtnNum button Even but i can't use this for my input fields cause you need to click it (or tab navigate it) then type your content in it and finally the datagrid data should refresh (once you leave the field, unfocus?).
Well not sure of the different ways to investigate this one, any ideas are welcomed :)
Many thanks
Thierry

Re: Datagrid - get input field data

Posted: Thu Feb 17, 2011 5:19 pm
by trevordevore
You can update the data grid when focus leaves the field. For fields you want to look at closeField and exitField.

Re: Datagrid - get input field data

Posted: Mon Feb 21, 2011 2:08 pm
by thierryPHILM
Hi Trevor,

Thanks for the reply, it's exactly what I was looking for (added an "on exitField" on the behavior script of the DG ) ! Still fighting with the datagrids....now trying to refresh correctly the datagrid array using my input text fields and some more options (checkbox etc). Datagrid are really powerfull to manage FORMS in livecode....even if I find this not very intuitive to learn.
Will post a source example once I get it ready.

Thanks for the support :D

Thierry

Re: Datagrid - get input field data

Posted: Mon Feb 21, 2011 8:55 pm
by Zryip TheSlug
thierryPHILM wrote:Hi Trevor,

Thanks for the reply, it's exactly what I was looking for (added an "on exitField" on the behavior script of the DG ) ! Still fighting with the datagrids....now trying to refresh correctly the datagrid array using my input text fields and some more options (checkbox etc). Datagrid are really powerfull to manage FORMS in livecode....even if I find this not very intuitive to learn.
Will post a source example once I get it ready.

Thanks for the support :D

Thierry
Hi Thierry,

Maybe this is the good time for me to suggest some additional resources for helping in your learning curve with datagrids:

The Data Grid Helper Plugin (DGH), our intuitive interface for building LiveCode's Data Grids. You can download a trial version free for 30 days here:
Data Grid Helper

From RevOnline:
- The Ben Beaumont's Data Grid Tour
- Introduction to datagrid

From The Bluemangolearning website:
- Data Grid Sample MP3 Library.zip
- Creating a Music Library Interface Part I

From The Slug on the Road website:
Datagrid Lab Stacks


And feel free to ask in the forum, any question you have.


Best regards,

Re: Datagrid - get input field data

Posted: Sun Jan 29, 2012 9:13 pm
by davidedynamicsGA45ff
Wow, thanks Thierry, Looks like there's plenty of help out there.
cheers David

Re: Datagrid - get input field data

Posted: Sun Jan 29, 2012 9:20 pm
by davidedynamicsGA45ff
Oops, sorry TheSlug, thanks to you also for all the info
cheers David