Solved

Windows Mobile 7 - Data Entry and Update

Posted on 2011-09-29
7
231 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

If you are anything like me, you install many apps on your phone and have your life on it, sometimes literally.  When I bought my current phone, a Samsung Galaxy S5 from Verizon, they were only selling the versions with 16 GB internal.  I didn't rea…
A short article about problems I had with the new location API and permissions in Marshmallow
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

867 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

15 Experts available now in Live!

Get 1:1 Help Now