Solved

Windows Mobile 7 - Data Entry and Update

Posted on 2011-09-29
7
234 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
Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

 
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

When I was a beginner in Windows Mobile programming, even for small test I used to create a single MFC dialog-based application with one button, and put my test code in the OnLButtonDown method. For Pocket PC it worked fine, on some Windows CE d…
Let me explain this picture a little bit.  First, in case you haven't already guessed, you are looking at my 2 phones, an Android Samsung Galaxy S5 on the left and an iPhone 5 on the right.  They are on their respective cradles on my desk.  But, you…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

680 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