cancel
Showing results for 
Search instead for 
Did you mean: 

Data Binding

Former Member
0 Kudos

Hello Friends,

I have a northwind database. Now I want to display the details of each categories(in detail view). How to do that? I also have attached an image of that.

View Entire Topic
saurabh_vakil
Active Contributor

For getting the product details first declare a press event for the listitem you are using to display the products. In this event from the selected item's context get the product ID.

Create a productdetail view and in the manifest.json file add a route to this view - ensure that you add a parameter to this route so that while triggering navigation from detail view to product view you can pass as a parameter the product ID (something like

"pattern": "productDetail/{productID}").

In the product detail controller inside the _onObjectMatched function get this product ID and bind the view to the path /serviceURL/Products(productID). This will let you bind the product details to UI controls on the productdetail view. This will conceptually be very similar to how on selecting category value in the master view the relevant category details including the products are being displayed in the detail view.