Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mere Mortals and StrataFrame: Strongly Typed Columns
Message
From
24/01/2007 07:45:36
James Hansen
Canyon Country Consulting
Flagstaff, Arizona, United States
 
 
To
24/01/2007 06:28:58
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01188485
Message ID:
01188567
Views:
27
Gary:

>>An advantage of the MM approach is that I can get a strongly typed List of strongly typed Entities that I can then do cool things with like attach to a DataGridView as a data source or can easily loop through with a for each loop. With the SF approach, I cannot create such a list because there is only one set of columns per BO.
>
>In SF, you can easily foreach through the CurrentDataTable property of the BO (this is a reference to the inner DataTable). You can also use a SF BusinessBindingSource. This is analagous to the native .NET2 BindingSource. You simply set the BusinessBindingSource's BusinessObject property to the appropriate business object. Then, in the grid, you set its DataSource property to the BusinessBindingSource which it sees as a legitimate datasource. Job done :)

But if in SF I do:
foreach (DataRow row in CurrentDataTable.Rows)
{
...
}
I don't get the strongly typed columns (nor custom columns) that I get with MM's CreateEntityList which returns an IList of Entity objects. Or am I missing something?

>>On the MM side, I can browse a list of Entity objects, but I have not found a way to browse an SF BO. This means that I cannot browse my SF BO defined custom columns.
>
>Not sure what you mean by "browse" in this context. You can easily use many of the SF BO methods to move through the SF BO. This changes the "CurrentRow" property which subsequently updates the current set of strongly typed properties and any custom properties you may have added to the BO.

I meant that with MM I can take that strongly typed (and possibly enhanced) list of Entity objects and bind a DataGridView to it, whereas in SF I believe I can only bind the the DataGridView to the BO's untyped and unenhanced CurrentView.

...Jim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform