Monthly Archives: November 2010

Comcast Sucks.

Yes I know, it has been said before number of times. I personally had a misfortune to have them as my provider, so I had a close encounter with the quality of their service.

But today they broke their own record in stupidity. A company I work for suddenly lost internet connection. Turned out they disconnected our service for non-payment! They say they had send a paper bill via snail mail. We never received the bill. So, instead of calling us asking what happened, instead of emailing us (we live in the 21st century for Cochrane sake!) they simply pulled the plug. On a business, causing numerous interruptions and LOB.

Good thing Droid phones allow tethering and some of us were saved by Verizon 3G. I think it’s time for FIOS

Auto-size columns in Infragistics WebDataGrid

Ever wished your WebDataGrid could have Table Layout = Auto like old UltraWebGrid? Then it could automatically resize columns width to data width with respect line breaks. Well, it can, and in style (pan intended). Thanks to Infragistics tech-support for starting me in the right direction – here’s first 2 steps that need to be taken:

  1. Don’t set column width property – either default or for specific column either in server-side code or declaratively and don’t set grid’s width property
  2. Open your grid CSS class file, it’s located at ~/ig_res/[Your Style Name]/ig_dataGrid.css.
    Locate tbody.igg_[Your Style Name]Item>tr>td class and add one more line at the end: white-space:nowrap. Here is an example with Office 2007 Style:

    tbody.igg_Office2007BlueItem>tr>td
    {
    	background-color:White;
    	border-right:solid 1px #D0D7E5;
    	border-bottom:solid 1px #D0D7E5;
    	padding:2px 5px 2px 5px;
    	height: 18px;
    	overflow: hidden;
    	text-align:left;
    	vertical-align:middle;
    	white-space:nowrap;
    }

Run your project – you will get a nicely autoresized grid columns:

WebDataGrid with autosized columns

But there’s one problem with this approach. Continue reading →