The term "scaffolding" is from Ruby On Rails, and is essentially a full set of "CRUD" pages for you to enter and manipulate data in your database. Initially, scaffolding was not meant for public use, rather your use as a develeloper to enter and use data quickly. We are moving in the direction however of outputting the scaffolds to an actual page so that you can create and customize editors as needed.
Using our scaffold is simple - just point it to a table in your database and off you go:
<cc1:Scaffold ID="Scaffold1" runat="server"
TableName="Products" />
This will setup a table and editor that will allow you to get data into your project quickly.
The AutoScaffold
Eric Kemp put together a page I use in every single project: The AutoScaffold. This page exposes a scaffold control for every table in every database you have declared in your website. Absolutely invaluable as you work with your database. You can find this page in the SubSonicCentral site that is placed in the install directory with 2.0.1
Foreign Keys
Scaffolding honors foreign key relationships by looking up the data in the FK table and presenting it in a drop-down list. The convention in use here is that the key is the first field in the table, and the descriptive field is the second (which will be the text shown in the drop-down).CSS
The editor table is CSS-enabled. You can pass in CSS values so that the editor page displays in a nicer manner:<cc1:Scaffold ID="Scaffold1" runat="server"
TableName="Products"
GridViewSkinID="scaffold"
EditTableCSSClass="scaffold-table"
EditTableItemCSSClass="scaffold-item"
EditTableLabelCSSClass="scaffold-label"
>
</cc1:Scaffold>
Many To Many Joins
The scaffold will also support many to many relationships. If your table, in this case "Products", has a many-many join with a table called "Category", you can show a checkbox list of categories on the Products scaffold page by using the "ManyToManyMap" property of the scaffold, which identified the joining (or Map) table:<cc1:Scaffold ID="Scaffold1" runat="server"
TableName="Products" ManyToManyMap="ProductCategoryMap" />
