Monthly Archives: May 2009

Global Chart Type for Dundas Chart Control

      Dundas Charts for .NET has many cool features like async callbacks, AJAX scroll and zoom, plenty of chart types and great visuals, but in some cases some of those features could turn out to be more of a burden than useful. One example – the ability to set chart type for each individual series of a chart. This offers great flexibility in building combination charts (you can display column and line on the same chart to reflect different series’ data), but you’re losing the Infragistics simplicity of just setting the chart type and binding chart to data without worrying about appearance of each individual series.
      This is especially inconvinient if you load chart appearance (including series appearance and chart type) from an external template. If you want to use chart type from the template, but feed it your own data – you’re stuck.  But there is a solution. Continue reading →

ASP.NET accessing session variables in class modules

Sessions are a great way to share variable across your entire application, but they’re not accessable directly in class modules since they’re outside of page scope. So if you try something like Session(“VariableName”) = value  inside of your class, you will get an error.

Fortunately there is a way.  Thru HttpContext.Current notation available such common properties as Session, Server, Application, Cache. So to access your session variable inside a class just use HttpContext.Current.Session(“VariableName”) = value

Fixing WordPress 2.7 broken permalinks

When I moved this blog from former IIS to this Apache hosting I wanted to enable “pretty” permalink structure /year/month/day/topic, knowing that mod-rewrite was installed and active. But when I did that – every link resulted in 404 “Not Found” error. Trying to find solution I in WordPress support forums or even googling it was to no avail.
Finally I realised that when WordPress was enabling new link structure, for some reason it wasn’t writting rewrite rules into .htacess file. So, I put them there manually:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . / [L]

And it worked.

Ultrawebgrid: Highlight row on MouseOver

To highlight row in Infragistics Ultrawebgrid on mouse over event you just need to follow 4 simple steps:

First, define a class to be used for highlighting, for example:

<style type=”text/css”>.over { BACKGROUND-COLOR: lightcyan }</style>

Second, set mouse over/out handler (either in source or thru designer):

<ClientSideEvents MouseOutHandler=”MouseOutHandler” MouseOverHandler=”MouseOverHandler” />

Third, implement event handlers:

/* highlight row on mouse over */
MouseOverHandler(gridName, id, objectType){
ohRow = igtbl_getRowById(id)
      if (ohRow) ohRow.Element.className =

/* return row backcolor on mouse out */
MouseOutHandler(gridName, id, objectType){
ohRow = igtbl_getRowById(id)
      if (ohRow) ohRow.Element.className =

Fourth (and this is important, see why) set background of the row style to inherit:

<RowStyleDefault BackColor=”Window” BorderColor=”Silver”
 BorderStyle=”Solid” BorderWidth=”1px”
CustomRules=”background-color:inherit” Cursor=”Default”> …

Now you’re all set! The row will be highlighted on mouse over.

Windows 7: First Impressions

I’ve been using Windows 7 Release Candidate for about a week and so far like it very much. Out of all Oses I’ve ever installed it was the first one to detect my home wireless network during setup. Oh and under Windows 7 for the first time Intel Wireless N card achieved full 300Mbps speed even though it is connected to a Dlink router (all manufacturers warn that to achieve full N speed you have to have both client and access point of the same brand). And overall it has a very light, easy feeling, I actually enjoy sitting behind Aero desktop. And only now in comparison, I understand what a bloated pressure was imposed by Vista behemoth.

No compatibility issues, all software and games work perfectly (by the way I am using 64-bit version of Windows 7). It looks like Microsoft did good this time. Apparently Windows releases follow the same law as Star Trek movies – every odd one sucks, every even one is good:

  • Windows 95 – weak start
  • Windows 98 – ok
  • Windows Me – sucked big time
  • Windows XP – pretty good
  • Windows Vista – big flop
  • Windows 7 – … so far so good

So hopefully Windows 7 will be a hit, as well as the new Star Trek movie (which I still have to see).

Changing hosting

When I got my $300 hosting bill today – it was a last straw. $120 a year for 100Mb in a single MySQL database, nessessity of a dedicated IP address simple so I could  use subdomains (another $60),  a gig of space and 80 gig monthly transfer for another $120 – thank you, but no, thank you.

Goodby DiscountASP, hello BlueHost.

Vista asleep at work

I was burning a 4 gig DVD-R and stepped away for a while. When I came back I found that Vista on my laptop nonchalantly went into a sleep mode, not really caring that the burning was only half-done. I think this is the end of my Vista experiments. Next stop – Windows 7 (hopefully it won’t bring the house down).