Datagrid - get input field data

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
thierryPHILM
Posts: 2
Joined: Wed Feb 16, 2011 2:36 pm

Datagrid - get input field data

Post by thierryPHILM » Wed Feb 16, 2011 3:22 pm

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

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Re: Datagrid - get input field data

Post by trevordevore » Thu Feb 17, 2011 5:19 pm

You can update the data grid when focus leaves the field. For fields you want to look at closeField and exitField.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

thierryPHILM
Posts: 2
Joined: Wed Feb 16, 2011 2:36 pm

Re: Datagrid - get input field data

Post by thierryPHILM » Mon Feb 21, 2011 2:08 pm

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

Zryip TheSlug
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 163
Joined: Tue Jan 26, 2010 10:15 pm
Contact:

Re: Datagrid - get input field data

Post by Zryip TheSlug » Mon Feb 21, 2011 8:55 pm

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,
TheSlug
http://www.aslugontheroad.com - Tutorials, demo stacks and plugins for LiveCode
Data Grid Helper - An intuitive interface for building LiveCode's Data Grids
Excel Library- Extends the LiveCode language for controlling MS Excel

davidedynamicsGA45ff
Posts: 47
Joined: Mon Dec 19, 2011 1:11 pm

Re: Datagrid - get input field data

Post by davidedynamicsGA45ff » Sun Jan 29, 2012 9:13 pm

Wow, thanks Thierry, Looks like there's plenty of help out there.
cheers David

davidedynamicsGA45ff
Posts: 47
Joined: Mon Dec 19, 2011 1:11 pm

Re: Datagrid - get input field data

Post by davidedynamicsGA45ff » Sun Jan 29, 2012 9:20 pm

Oops, sorry TheSlug, thanks to you also for all the info
cheers David

Post Reply