Solved

Windows Mobile 7 - Data Entry and Update

Posted on 2011-09-29
7
233 Views
Last Modified: 2013-12-27
Him

I have a simple form which displays data to the user who can change some fields (text boxes mainly).  I would like to have the underlying data store updated as the user moves off each field - I initially wanted to update when the user tried to move off the page being displayed but I have not figured out how to trap the 'Back' key so that I can perform the update before the GoBack.

My second approach was to add 'Lose Focus' handlers to each text box and update the underlying data object this way.

I also thought about using Data Binding as then I believe that the updates would be handled by the framework - as I just have a list of rows within a Grid I'm not sure that I can use binding as the Grid does not appear to have a data source.

Any thoughts on what is the best approach to having a data entry / update form and ensure that all updates are handled without an explicit 'update' button which I think would be messy.
0
Comment
Question by:ChrisMDrew
  • 5
  • 2
7 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 36898275
"My second approach was to add 'Lose Focus' handlers to each text box and update the underlying data object this way."

You can add one handler to each textbox and just cast the sender as a textbox and take the name or tag to know which textbox the user is updating.

Do you not like this approach? I would probably take this method to update the data.
0
 

Author Comment

by:ChrisMDrew
ID: 36911081
The main thing I didn't like about this approach was the number of times I would end up updating the back-end data store but this may be down to my approach of data storage.

Essentially I have an object ('whereabouts') which has within it a list of jobs each of which has a list of tasks.  I save the 'whereabouts' object to the IsolatedStorage.

Now if I make a change to a specific task I cannot simply update the task - I need to update the entire whereabouts object to IsolatedStorage.  Now the amount of data is likely to be fairly small but I thought that this was still an overhead if I updated after every change.

Perhaps my error is in the way I am storing the data rather than in how I am allowing the user to edit it???
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 36911089
Are you developing for Mango?
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 48

Expert Comment

by:Mikal613
ID: 36911100
If not then you should. You can use databases on the device now and you only need to update what you want.

http://www.windowsphonegeek.com/articles/Windows-Phone-Mango-Local-Database-mapping-and-database-operations
0
 

Author Comment

by:ChrisMDrew
ID: 36911190
This is a proprietary application of no use to the general public and is being developed for Windows Mobile 7.0 as that is what my client has.  I'd rather not have to upgrade all their phones as well!
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 36911209
Sorry :(
0
 
LVL 48

Accepted Solution

by:
Mikal613 earned 500 total points
ID: 36911218
You can use a listbox and bind your task collection to it

http://3water.wordpress.com/2010/07/25/listbox-on-wp7/
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently asked a question (http://www.experts-exchange.com/Programming/Smartphones/Android/Q_28684946.html) about Computer Inventory applications for Mobile Devices.  I was specifically interested in an app I could use on my android phone.  The be…
Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question