Blog: Posts from September, 2012

Labels
AJAX(112) App Studio(7) Apple(1) Application Builder(245) Application Factory(207) ASP.NET(95) ASP.NET 3.5(45) ASP.NET Code Generator(72) ASP.NET Membership(28) Azure(18) Barcode(2) Barcodes(3) BLOB(18) Business Rules(1) Business Rules/Logic(140) BYOD(13) Caching(2) Calendar(5) Charts(29) Cloud(14) Cloud On Time(2) Cloud On Time for Windows 7(2) Code Generator(54) Collaboration(11) command line(1) Conflict Detection(1) Content Management System(12) COT Tools for Excel(26) CRUD(1) Custom Actions(1) Data Aquarium Framework(122) Data Sheet(9) Data Sources(22) Database Lookups(50) Deployment(22) Designer(177) Device(1) DotNetNuke(12) EASE(20) Email(6) Features(101) Firebird(1) Form Builder(14) Globalization and Localization(6) How To(1) Hypermedia(2) Inline Editing(1) Installation(5) JavaScript(20) Kiosk(1) Low Code(3) Mac(1) Many-To-Many(4) Maps(6) Master/Detail(36) Microservices(4) Mobile(63) Mode Builder(3) Model Builder(3) MySQL(10) Native Apps(5) News(18) OAuth(9) OAuth Scopes(1) OAuth2(13) Offline(20) Offline Apps(4) Offline Sync(5) Oracle(11) PKCE(2) Postgre SQL(1) PostgreSQL(2) PWA(2) QR codes(2) Rapid Application Development(5) Reading Pane(2) Release Notes(183) Reports(48) REST(29) RESTful(29) RESTful Workshop(15) RFID tags(1) SaaS(7) Security(81) SharePoint(12) SPA(6) SQL Anywhere(3) SQL Server(26) SSO(1) Stored Procedure(4) Teamwork(15) Tips and Tricks(87) Tools for Excel(2) Touch UI(93) Transactions(5) Tutorials(183) Universal Windows Platform(3) User Interface(338) Video Tutorial(37) Web 2.0(100) Web App Generator(101) Web Application Generator(607) Web Form Builder(40) Web.Config(9) Workflow(28)
Archive
Blog
Posts from September, 2012
Thursday, September 6, 2012PrintSubscribe
Allow Query-by-Example

The application generator automatically configures all data controller fields for adaptive filtering. Only “blob” fields such as pictures and long text fields are excluded. Fields created manually will have filtering disabled. The Allow Query-by-Example property controls if adaptive filtering is allowed for a field.

Disable Filtering

Query-by-Example can be disabled to prevent filtering on a field.

Start the Project Designer. In the Project Explorer, double-click on Products / Fields / ProductName node.

ProductName field of the Products controller in Code On Time web application generator's Project Explorer.

Disable Allow Query-by-Example.

Property New Value
Allow Query-by-Example false

Press OK to save the field. On the toolbar, press Browse.

Navigate to the Products page. Click on the Product Name header. No filtering options will be available.

Product Name column with filtering options disabled.

The Product Name field will not be available for search in the advanced search bar.

Product Name not available for filtering in the advanced search bar.

Enable Filtering on Large Text Fields

Large text fields do not have filtering enabled because most search operations would not work, such as auto-complete, sampling, and multiple values. For Microsoft SQL Server, the only available search options are “contains” and “does not contain”.

Let’s enable filtering for the Description field in the Categories controller.

In the Project Explorer, double-click on Categories / Fields / Description node.

Description field in the Categories controller in the Project Explorer.

Enable Query-by-Example.

Property New Value
Allow Query-by-Example true

Press OK to save the field.

In the Project Explorer, double-click on Categories / Views / grid1 / Description data field node.

Description data field in grid1 view of Categories controller.

Change the Search Options property.

Property New Value
Search Options $disablesamples, $disablemultiplevalues, $disableautocomplete, $contains, $doesnotcontain

Press OK to save the data field. On the toolbar, press Browse.

Navigate to the Categories page. Activate the dropdown in the Description column header. Two text filters are now available – contains and does not contain.

Description column header filtering options only display 'contains' and 'does not contain'.

The filters will also be available on the advanced search bar.

Description field filter options in the advanced search bar are limited to 'contains' and 'does not contain'.

Tuesday, September 4, 2012PrintSubscribe
Designing the Forms

Let’s customize the forms on the Order Manager page.

Floating Category Data Fields

When a customer is selected, the data item is displayed in the form view editForm1. The form data fields are rendered top-down.

Customers editForm1 has data fields rendered in a top-down fashion.

Let’s have the data fields displayed in a more compact fashion.

Switch back to the Project Designer. On the Pages tab of Project Explorer, double-click on Order Manager / c101 / view1 / editForm1 / c1 – Customers category node.

Category 'c1' of Customers 'editForm1' view on the Order Manager page in the Project Explorer.

Change the Float property:

Property Value
Float Yes

Press OK to save the category. Right-click on Order Manager page node, and press View in Browser.

Context menu option 'View in Browser' for Order Manager page node in the Project Explorer.

The data fields in Customers form view float from left to right and wrap when they reach the right side of the browser window which makes for a more compact presentation. If the browser window is resized, the form will resize as well.

Customers edit form data fields are floating, making the form much more compact.

Configuring a Multi-Column Form

The picture below shows editForm1 view of Orders data controller. Let’s use categories to organize the data fields in multiple columns.

Orders edit form created by the application generator.

In the Project Explorer, right-click on Order Manager / c102 / view2 / editForm1 view node. Select New Category context menu option.

New Category context menu option on editForm1 view of Orders controller.

Assign the following properties:

Property Value
Header Text Shipping Info
Description This is the shipping information.
New Column Yes

Press OK to save the category.

In the Project Explorer, expand Order Manager / c102 / view2 / editForm1 / c1 – Orders category node. Select all data fields that start with “Ship-”. Drag the data fields onto c2 – Shipping Info category node.

All shipping fields selected and dragged onto 'c2' category.       All shipping fields have been moved into category 'c2 - Shipping Info'.

Right-click on Order Manager page node and select View in Browser.

View in Browser context menu option for Order Manager page in the Project Explorer.

Data fields on the Orders form will be split in two columns.

Orders form with data fields split in two columns.

Custom Category Template

The Order Details layout of editForm1 view created by the application generator is shown below.

Order Details edit form created by Code On Time web application generator.

Let’s create a custom layout for the first category in Order Details form. In the Project Explorer, right-click on Order Manager / c103 container node, and select New Control.

New Control context menu option on 'c103' container node in the Order Manager page.

Next to the User Control property lookup, activate the New User Control icon.

New User Control icon to the right of User Control property lookup.

Assign a name to the user control.

Property Value
Name OrderDetails_CustomCategoryTemplate

Press OK to insert the new user control into the User Control property, and press OK again to save the control.

On the Project Designer toolbar, press Generate. When complete, right-click on Order Manager / c103 / control1 node, and press Edit in Visual Studio.

Edit in Visual Studio context menu option for 'contol1' will open the user control in Visual Studio.

The template file will open in Visual Studio. On the menu, select Edit | Advanced | Format Document. Replace everything after the <%@ Control %>  element with the following:

<div style="display: none;">
    <div id="OrderDetails_editForm1_c1">
        <table>
            <tr>
                <td style="padding-right: 36px;font-weight:bold;">Product:</td>
                <td style="padding-right: 18px;">
                    <span class="FieldPlaceholder DataOnly">{ProductID}</span>
                </td>
                <td style="padding-right: 18px;">Discount:</td>
                <td>
                    <span class="FieldPlaceholder DataOnly">{Discount}</span>
                </td>
            </tr>
            <tr>
                <td>Unit Price:</td>
                <td>
                    <span class="FieldPlaceholder DataOnly">{UnitPrice}</span>
                </td>
                <td>Quantity:</td>
                <td>
                    <span class="FieldPlaceholder DataOnly">{Quantity}</span>
                </td>
            </tr>
        </table>
    </div>
</div>

Save the file.

Refresh the web browser page and select a customer, order, and order detail data rows. The first category of editForm1 view of Order Details data controller will be rendered using the new template.

Order details edit form with a custom category template.

Tuesday, September 4, 2012PrintSubscribe
Rearranging Data Fields

The application generator composes this view of Customers from the database.

Customers grid on the Order Manager page without any customization.

Let’s change some of the data fields presented in the view. For example, let’s move Phone data field next to Contact Name, remove the Region data field, and add Fax to the view.

Moving

Switch to the Project Designer. In the Project Explorer, activate the Controllers tab and expand to Customers / Views / grid1 data view node. Drag Phone data field and drop it on the right side of ContactName data field to place it after the target.

Dropping Phone data field on the right side of ContactName data field.     Phone data field has been placed after ContactName in the list of data fields in view 'grid1'.

Deleting

Right-click on Customers / Views / grid1 / Region data field node, and select Delete.

Delete context menu option on the Region data field.     Region data field has been removed from 'grid1' view.

Adding

Expand Customers / Fields node. Drag Fax field node onto Customers / Views / grid1 node to create a data field from the Fax field.

Dropping Fax field node onto 'grid1' view node will create a data field.     Fax data field has been created in view 'grid1'.

Switch to the Pages tab in the Project Explorer. Right-click on Order Manager page node, and press View in Browser.

View in Browser context menu option for Order Manager page node will generate the project and open the relevant page node.

The Customers grid with new column layout will be displayed. The Phone field is more conveniently placed next to the Contact Name. The Region field has been removed. Fax has been added.

The modified Customers grid.