Geeks With Blogs

Jason Coyne Jason Coyne's blog October 2005 Entries
Accessing columns collection via the private autoGenColumnsArray property in a DataGrid
I have seen several people looking for a way to access the Columnscollection when using the AutoGenerate = true option. Somepeople have gotten so far as to find the private autoGenColumnsArraythat has the information, but we as developers have no way to accessthis information.I have come up with a solution for the problem, (as I am sure manyothers have) using reflection. Here is some sample code that willprint out the auto generated column names from a datagrid.As stated, this code uses reflection. ......

Posted On Tuesday, October 25, 2005 7:01 PM

Getting human readable values out of an enum.
I found a post on Abhinaba's Blog talking about a cool way to override ToString on an enum to get human readable values out of it. I like the atributes, but have my own solution below. In the past I have used a function that converts the enum strings to human strings. This code relies on the developer using good naming standards for the enum values. But if you can't rely on that, you couldn't rely on them to put in the attribute values either, so I call it a wash. I have another function that you ......

Posted On Thursday, October 20, 2005 5:38 AM

Solution : How to handle null values (especially date time) in a c# web service
Here is another programming blog entry. Sorry for the normal friends :) I recently ran into a problem with a web service I was trying to call from c# where the web service returned null dates (and other null values on elements that end up de-serialized as value types) I didn't find any good solutions online (other than wait for nullable types in c# 2.0 or change the service, neither of which was applicable in my situation) I ended up working out a solution with microsoft, and here it is. The following ......

Posted On Tuesday, October 18, 2005 8:07 PM

Copyright © Jason Coyne | Powered by: