![]() The data label contains an expression (text box value minus one).The text box's default value is 30 the starting point for the timer countdown.The timer is set to tick every one second.The following is a breakdown of how each control contributes to the list refreshing, based on the timer countdown: This demonstration uses three controls: a timer, a data label, and a text box. Keep the option to Call this method when the form loads. Right-click the Sales Items SmartObject and select Design View.Īnd select List View for the view type.In the next step, you add the timer control to this view so that it refreshes at set intervals. Create a list viewbased on the Sales Items SmartObject.Click the Edit Sales Items title once again to close the running view.(Pressing on your keyboard does not save the item.) Enter an item name and price and click Save. Right-click the Edit Sales Items view and select Run.After the timer reaches zero, the list on your display view refreshes and you see your changes. Allow users to Create, Save, and Delete rows. In this case, you can create a rule to retrieve items based on a filter or event. If you uncheck this option, K2 does not retrieve records when the view loads. By default, K2 retrieves all the items in the linked SmartObject and displays them on the view when it loads. You add a timer control to the second view that refreshes the list every 30 seconds.Ĭall this method when the form loads. The second list view is not editable and is the view your customers see when looking at the web page. The first list view is editable and you use it to enter and edit items and prices. You create two list views from the SmartObject. You begin by creating a SmartBox SmartObject to store sales items and prices. In this way, you ensure your list always shows the latest items and prices. Because you don't always know when the pricing changes, you use a timer control to refresh the list at specific intervals. Several other employees maintain the list of items and pricing. You work in Sales where you have a web page that shows a list of items for sale and includes the current price. Examples of using this control include refreshing news feeds, displaying countdown clocks, and updating values in list displays.Ī timer control countdown resulting in a list refresh This article illustrates how to use the Timer control to refresh data on a view at set intervals. ![]() How To: Automatically Refresh Data on a View with a Timer Control
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |