Contents tagged with C#
-
Conditional Formatting in the Silverlight DataGrid
I’ve been an asp.net developer for some time now and I was excited to jump on to Silverlight when it 2.0
was released a few months ago. One thing I really struggled with was applying conditional formatting to
the individual cells in the DataGrid control. Coming from an asp.net background, I carried a lot of
assumptions with me (big mistake). I thought I could get a hold of the rows or cells collection and have
my way with it, but no such luck. I stumbled down several paths which all ultimately lead to dead ends.
After killing hours (maybe days) on trying to figure this out, I had to let it go and move on. Now a month
later I decided to give it another shot and I finally got it. The answer was right in front of me all along.
I knew about the IValueConverter interface, but I didn’t fully understand its capabilities. I thought it was
only used for converting an object into a text representation or vice versa. Actually, you can return
anything you want from it. So you can return a Button, Grid, or whatever. -
Web Profile Builder 1.2.0.0 Released
Files can be downloaded from the Web Profile Builder project page.
If you are unfamiliar with Web Profile Builder, you can read my initial blog post about it here.
Details of this release can be found on the Code Gallery web site.
I had a little time to put together some basic documentation. It is available from the release download section. -
Web Profile Builder 1.1.0.0 Released
Files can be downloaded from the Web Profile Builder project page.
-
ClientID Problem In External JavaScript Files Solved
Well, at least for me it is. I say that because this solution might
not appeal to the masses, but it works great for me. -
A more elegant solution to display GridView header and footer when the data source is empty.
I think the need to always show the header and footer of a GridView is pretty common.
When I first ran into this problem, I went to Google and found lots of content about this.
Some suggest tampering with the data source to add an extra row if it’s empty.
Others show overriding the CreateChildControls method.