The ‘Page Styling App’ (example_pagestyling) has a Navigation Panel (the left hand side) based on a SQL Select statement.
If you look in the Page Attributes, you can see how it and the Selection delegate are defined. This can also be seen in the ‘NavPanel App’ (example_navpanel).
Q:
I’ve tried to make something like that with the demo “Example dynamic Grid cell colors”. I’ve added a menu on the left side.I just wanted to fill this navigation with order ID’s, so I made the query, but the navigation doesn’t fill with the data from the database. Am I missing something?
A:
Make sure you use the actual column name from the table (not the caption/description) in the SQL Select statement. This needs to be:
select orderid from orders
and also in the ‘Item sync expression’:
orders.orderid
Q:
I want to change the data on the right side of the form when I double click in the navigation.
A:
If you look back at the Page Attributes in the example_pagestyling App, you will see the Selection delegate. This determines what happens when you click (or double-click if you have Double click to select set to True) in the Navigation Panel.
Here, it is set to:
$("section:section1?action=search&text={}")
This is an ‘inline delegate‘ to select section1 and search for the value you have selected in the Navigation Panel, passed as {}. To perform the search, the section1 section must have a Search field set that matches the value you are going to pass. Here it is the customers.companyname field and the field has its Search field attribute set to True.