The
Manage uses case uses a panel which contains fields to maintain the attributes of a selected entity.
With the Smart panel it's very easy to customize your user interface. On your panel you can add predefined panel items like textboxes and dropdownlists, but you can create your own panel items in your application as long as they implement the
IPanelItem interface. This way you can still use the framework functionality and add your own customizations.
The SmartPanel class structure
The Smart Panel ships with a default set of controls. These are frequently used controls like a Textbox and Dropdownbox. Controls are contained in panel items and these panel items are contained in a panel. This can be visually modeled like this:
A panel item results in one line of controls in the panel. Note that this panel can be in a web page as well as on a Windows Form.
Generate a panel
You can generate a smart panel with the smart panel template using
Tobago MDA generator. A business class called
Prospect with the attributes Voorletters, Achternaam en Geslacht will generate the following code:
protected override void OnInit(EventArgs e)
{
Add(TextBoxItem.Create("Voorletter(s)", "ProspectVoorletters", 10, Enabled, true));
Add(TextBoxItem.Create("Achternaam", "ProspectAchternaam", 35, Enabled, true));
Add(RadioButtonListItem.Create("Geslacht", "ProspectGeslacht", Enabled, true));
}