October 2003 - Posts

A new article that I wrote is published on the MSDN Belux site. It's about how to extend the DataGrid in the Windows.Forms namespace by adding a custom DataGridColumnStyle to it. Just creating the ColumnStyle is not that difficult, but when you want full design-time support for that column (e.g. listing it in the dropdown when adding ColumnStyles to a TableStyle), things get a little bit complicated. This article shows how to accomplish this and illustrates it with an example. The example is the ExtendedDataGrid that has a new ColumnStyle; the DataGridObjectColumn. This column can be used to evaluate expressions entered at design-time and displaying the results in the DataGrid. For example it's possible to have a column in your grid that evaluates price * (vat/100)without having to add another property to your collection or a calculated column to the your DataSet. The trick is to compile the expression that is stored as a string, using CodeDom. This technique is explained as well in the article.

Summary: The System.Windows.Forms DataGrid has several limitations, but is very extensible. This article shows how to create a custom DataGridColumnStyle that evaluates expressions for each row, stored in a string value, at run-time. This can be useful if the DataGrid shows rows that have properties that are objects themselves, or to add calculated fields. To obtain this behavior, an ExpressionEngine is built which can compile and execute code at run-time. To ensure ease-of-use and provide full design-time support for the custom DataGridColumnStyle, a custom DataGrid, based on the standard DataGrid is built too.

My thanks go to Tom, who managed to put the article online while attending the PDC! Btw, he's got an excellent coverage of this event on his blog.

As you may have noticed I am not in LA, so I have rely on other sources to get all the news from PDC. Scott Hanselman did a great job commenting nearly real-time. Thanks a lot Scott! A live stream of the keynote would wonderful, but this kind of posts is awesome too.

Clemens Vasters blogged too. The words “Hey, Linux Penguins, here's the new thing to clone. Good luck.” made me laugh out loud! :-)

Since my last post about EIF, the download magically disappeared. But now it can be downloaded again from this location. I don't know how long it will stay online this time, so better be fast... :-)

For you who do not know EIF:
The Microsoft Enterprise Instrumentation framework (EIF) enables applications built on the .NET Framework to be instrumented for manageability in a production environment. This framework provides an extensible event schema and unified API which leverages existing eventing, logging and tracing mechanisms built into Windows, including WMI, the Windows Event Log, and Windows Event Tracing. An application instrumented with this framework can publish a broad spectrum of information such as errors, warnings, audits, diagnostic events, and business-specific events. In addition, Enterprise Instrumentation enables tracing by business-process or application service, and can provide statistics such as average execution time for a given process or service.

Recently I discovered (thx Faan) a great way to fill up some useless time, like driving to my work: listening to technical sessions on my Pocket PC. Today a lot of great resources are available that can be downloaded and saved on a Pocket PC to watch while you're on the road. Even sessions with video can be saved since large memory cards (+128 MB) are not that expensive. Here is a list of resources that I know, please let me know if you know others:

I experienced some problems watching the MSDN TV sessions on my Pocket PC running Windows Mobile 2003. It seems that the Windows Media Player 9 Series for Pocket PC do not support the audio encoding used for the MSDN TV sessions. But luckily Microsoft has a nice (free!) tool to easily create and convert Windows Media files: Windows Media Encoder. With this tool you can convert files to a format suitable for Pocket PC.

Microsoft USA Webcasts has an huge list of recorded webcasts, but these can not be viewed on a Pocket PC. It's possible to play the sessions on your normal pc and record the audio output so you could listen to that output on your Pocket PC. But it would really be a killer feature to be able to listen to the recorded sessions in their original format. The site tells that starting from October 14th, they will switch to Microsoft Office Live Meeting (instead of Interwise), so lets hope Office Live Meetings can be viewed from a Pocket PC (please!!).

Since yesterday the Microsoft Enterprise Instrumentation Framework (EIF) can be downloaded from the MSDN Downloads section downloaded from the MSDN Downloads section. Before yesterday EIF could be downloaded only from MSDN Subscription Downloads. So now it's for everyone!

For you who do not know EIF:

The Microsoft Enterprise Instrumentation framework (EIF) enables applications built on the .NET Framework to be instrumented for manageability in a production environment. This framework provides an extensible event schema and unified API which leverages existing eventing, logging and tracing mechanisms built into Windows, including WMI, the Windows Event Log, and Windows Event Tracing. An application instrumented with this framework can publish a broad spectrum of information such as errors, warnings, audits, diagnostic events, and business-specific events. In addition, Enterprise Instrumentation enables tracing by business-process or application service, and can provide statistics such as average execution time for a given process or service.

From MS Belux Forums by Gerd:

Day 1: Developer Keynote, Hardcore ADO.NET, Yukon first encounter, SQL Server Reporting Services uncovered, .NET Framework Security Best Practices, Building Extensible Applications using Attributes, Reflection and Code Generation, Communication & Collaboration Technologies (SharePoint Technologies, RSS, Weblogs), Service Oriented Architecture, Agile Programming, Integrating Applications with BizTalk 2004: a developer perspective, Develop Solutions for Managing Customer Relations with MS CRM, Web services wizardry with Web Services Extensions, J2EE & MS: love and marriage?

Day 2: PDC Highlights with Avalon, Indigo ...

Very nice!

Today my new article on MSDN Belux went online.

<quote author=“MySelf“>
Attributes can be used to decorate language elements with additional information that can be retrieved at run time by using Reflection. You can easily build your own custom attributes to create powerful generic solutions. At first sight they might to seem a little bit useless. But this article shows how they can be used to create a simple extensible framework to provide validation of property values.
</quote>

Quoting yourself, how “geek“ is that? :-) Thanks Tom for the layout and publishing.

From Tom's Corner:
<quote>
Is anyone interested in Belgian blogger drink (or dinner for that matter) after the MSDN Chapter/TechNet Briefing in Kinepolis, Brussels on October 7th, 2003? Well, I would not want to limit the attendance to bloggers, so everyone who is interested can join us.

Drop a comment if you're interested or see me on the Chapter/Briefing itself. I'll be at the Microsoft desk  (plaster on left arm)...
</quote>

So to all Belgian .NET guys and girls: see you there!

More Posts