Skip to main content

Posts

Showing posts from May, 2013

Using dynamic data with Telerik RadPivotGrid

Using the Telerik RadPivotGrid is a great way to render out financial data such as balance sheets,  a UI can be knocked up very quickly: The issue with this is you're required to use strongly typed entities (classes), what do I mean by this? I mean the class being bound to the control has to have explicitly named properties which will be used for the columns and rows in the pivot grid. The ' Getting Started ' pages on the Telerik website show how to use a collection of the following entity: The binding is done in XAML: As you can see the properties of the Name class are explicitly defined, this provider resource is then used as follows: This gives you the following output: I don't have a strongly typed entity, so what am I going to do? What follows is a way to binding data with no structure, when I say no structure I mean the data is no more than name-value pairs or more commonly known as a dictionary\map. I've split the metadata from the dat...

Using Windows update agent object model to get all installed hotfixes (KBs)

A simple bit of code to get all the installed hot-fixes for an MS operating system - we do this so we can log any machines in the enterprise missing the required patches. Windows update agent object model or WuApi makes this very easy - just add a reference to the WuApi COM interop library and you're away. You'll see below I'm using regular expression to match the hotfix naming convention, e.g. KB2484841. Loading .... I'm using a custom disposable object call ComDisposable and an extension method to add the COM interop types to the ComDisposble, these are there just to make sure they get cleared down at the end: Loading ....