Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BindingSourceDisplayMember of combobox
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00897497
Message ID:
00898173
Views:
17
It is only an extra trip if you already have the data in memory and you are going back to the database just to format your fields for display. This is the real problem. In modern application architecture we have this concept of application layers with separate concerns: presentation, business logic and data access. When you concatenate strings in your data access layer to format it for presentation then you have UI formatting code in your data access layer. Formatting of the data for presentation should be done up in the UI layer. That is what DataViews are for.

I understand that what you did works perfectly and its expedient to do it that way but you have to balance that against code maintainability.

>David,
>
>Thank you for the calculated column idea and the links.
>
>Did you infer that the way Carl showed me causes extra trips to the database? Using MM.NET allows me to get away from to know ADO.NET well before becoming productive, but I will have to master it soon or later.
>
>Chen
>
>>Another way of doing it without making a trip back to the database is to use a calculated column in your datatable. Then bind to the calculated column.
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform