Tuesday, September 4, 2012

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.

No comments:

You can find more about Code OnTime Generator, Data Aquarium Framework, and other great products here.


© 2010 Code OnTime LLC. Intelligent code generation software for ASP.NET. Visit us at http://codeontime.com