Solved

Windows Mobile 7 - Data Entry and Update

Posted on 2011-09-29
7
230 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
A short article about problems I had with the new location API and permissions in Marshmallow
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now