Building Mobile, Touch-Oriented Business Apps with the HTML Client in Visual Studio LightSwitch 2012
Based on the implementation provided so far, when a user selects a customer on the home screen, the application displays customer details but doesn't permit editing information. To make editing changes, follow these simple steps:
- Open the BrowseCustomers screen in the Screen Designer.
- Select the Tile List control.
- In the Properties window, click the Item Tap action again.
- In the Edit ItemTap Action dialog, select the editSelected method (see Figure 20) and select the Add Edit Customer screen you created previously.
Figure 20 Providing an Add/Edit screen for the selected customer.
With this change, when a customer is selected from the main screen, users will access the same screen you used to add new customers. However, this screen still doesn't allow editing of orders. To enable users to edit orders, in the same screen expand the Command Bar item located under the Rows Layout | Orders element (see Figure 21) and add a new button. The method to choose at this point is addAndEditNew.
Figure 21 Enabling orders editing.
This is something you've already learned throughout this article, so you'll be absolutely comfortable with generating the new screen. After completing this task, run the application again and check how additional editing features work against your data now.