use fields without a dataprovider attached

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

Re: use fields without a dataprovider attached

Postby grahamg » Thu Sep 25, 2008 6:15 pm

If you want to get the data from the fields, you can loop though the elements, check if they are a field, then get the dataprovider and with that the current value.


Yep, I think that's what I should be doing.

Thanks Paul

Graham
Graham Greensall
Worxinfo Ltd
www.worxinfo.com
grahamg
 
Posts: 752
Joined: Fri Oct 03, 2003 3:15 pm
Location: Midlands UK

Re: use fields without a dataprovider attached

Postby hsummerhays » Wed Jul 20, 2011 6:31 pm

Everyone probably knows this by now, but for the newbies out there (like me) ...

You can set the dataprovider of a field to a form variable and then the form variable changes when the field does and vise-versa. It's not as intuitive as elements.myDetachedField.text = "blah", but it works well. It is probably wise to never leave a dataprovider set at "None".
Hugh Summerhays
Mainstream Data
hsummerhays
 
Posts: 29
Joined: Tue Mar 01, 2011 6:12 pm
Location: SLC, UT, USA

Previous

Return to How To

Who is online

Users browsing this forum: No registered users and 4 guests