Category Archives: New Stuff

News about site and in general

Microsoft with the sense of humor

Visited IE test-drive site in my Chrome browser today and was greeted with a cheery banner:

Microosft about Chrome

I guess that “Don’t forget to enable your partial hardware acceleration in the about:flags thingy…” is a veiled reference that IE9’s HTML5 is fully “hardware accelerated”. Still funny.

Update: Since Microsoft is abandoning their “native HTML5” party line the funny logo has been removed as well. Too bad, especially after comparing FPS on speed tests.

Implementing getNextRow in WebDataGrid

UltraWebGrid had a very convenient getNextRow() client-side function which returns next row in row collection. WebDataGrid does not have an analog, but it’s pretty easy to recreate the functionality:

function getNextRow(i_oRow) {
      var iRowIndex = i_oRow.get_index();
      var aRows = i_oRow.get_grid().get_rows();

      return aRows.get_row(iRowIndex + 1)
}

This function accept grid row as a parameter, gets the row’s index and return row with incremented index from grid row’s collection.

Changing hosting. Again

Two years ago I switched to BlueHost. For a while it’s been a beautiful run, but lately the service has become horrible. Constant downtimes, and when sites were up they we unbelievable slow. So after a couple of MySQL DBs export/imports, after moving DNS hosting to my registrar GKG.NET – it’s:

Goodbye BlueHost, Hello Feral Hosting.

Posting from HELLOTXT to Custom URL

HELLOTXT is an excellent service allowing you to update multiple social networks, blogs and microblogs at once. Among supported services – WordPress, Blogger, Delicious, Facebook, Twitter and many more.

One of the selections is Custom URL. What it does – it allows you to specify URL of your own site and then you’re free to do whatever you need with received data. This makes HELLOTXT services very expendable. For example natively it doesn’t support Russian LiveInternet network, but using Custom URL my site can accept posted data and then create a new LiveInternet entry via posting by email.

Setting Custom URL is very easy in HELLOTXT. You specify 2 fields:1st is Name*Code which can hold any data that your site can check to verify that call is authentic, 2nd field is URL – the URL of your site. Important! Make sure you specify actual file name, e.g. if it’s http://www.mysite.com/hellotxt/index.php – enter it as is, if your enter just http://www.mysite.com/hellotxt you may get 405 error “service not allowed”.

Once this part is setup your page will receive following FORM fields in HTTP request:

name, body, title, msg_code, image_code, video_code, audio_code, v

field “name” will have name*security code you specified in Custom URL setup. The rest depends on your setup, in my case (microblogging/status) field “body” had the actual message.

Fix for first release of Unique Article Wizard multisite WordPress plugin

If you’re using UAW plugin in your WordPress MU/3.0+ blog, starting version 3.1.26 it supports multisite environment (ability to have individual settings for subdomain blogs). But initial release had a bug resulting in errors of missing config.php as well as

permission denied – your token does not match our records

To fix this error, open file article_mods.php and locate function uaw_add_article. In global declaration after $win add , $blog_id. Then locate line

$uaw_config_file = getcwd() . ($win == "" ? '/config.php' : '\\config.php');

and replace it with

if ($blog_id == '1') 
   {$uaw_config_file = getcwd() . ($win == "" ? '/config.php' : '\\config.php');}
else
   {$uaw_config_file = getcwd() . ($win == "" ? '/config_'.$blog_id.'.php' : '\\config_'.$blog_id.'.php');}

Upload modified file to you UAW plugin directory, overwriting the old one and you’re good to go

Improved Auto-size columns for Infragistics WebHierarchicalDataGrid

In the previous post I described a method to automatically resize columns for Infragistics grid control. It works (most of the times) for flat WebDataGrid, but if you try same approach with WebHierarchicalDataGrid – it will fail for child bands.

Lets review what we’re trying to accomplish. A grid column should automatically resize to whichever is wider: either size of widest data in a column cell, or size of column header’s caption.

First is accomplished by not setting column width explicitly and by setting white-space attribute of cell’s style to nowrap. It can be done by either opening grid CSS class file 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;
}

Or (if you don’t want to touch original style) same can be achieved by *CssClass properties exposed by the grid.

Second (resizing column to header’s caption width, if it is wider then cells’ data) is a bit tricker. Continue reading →

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 →

WebDataGrid: Custom drag and drop columns when Colum Moving behavior is enabled

Infragistics Aikido WebDataGrid offers a nice built-in ColumnMoving behavior. When enabled – it allows user to drag columns to change their order:

WebDataGrid with ColumnMoving behavior enabled

But what if you want to keep this behavior and add your own custom column drag-and-drop? For example to create your own column grouping, since WebHierarchicalDataGrid doesn’t handle grouping well.

In this post I will describe a simple technique how to both keep behavior shown above and implement custom column drag-and-drop:

WebDataGrid with custom column drag-and-drop
Continue reading →

Excellent Freeware RAR password recovery utility

If you ever need to recover lost password to your RAR file (or, let’s be honest, unrar a file you got from the Internet), look no further than cRARk – beautifully done RAR password recoverer. It’s the only utility capable of using NVIDIA CUDA, which utilizes GPU for password permutations, and even without that it’s extremally fast. And it’s free!

You can download it at http://www.crark.net

UltraWebGrid in Infragistics 9 displays default column captions.

Recently I upgraded an ASP.NET project from ancient 6.3 version of Infragistics to current (at the moment) 9.2. Suddenly UltraWebGrid control began to display an unpleasant effect – columns that used to have no caption now showed what appeared to be default captions:

New look of UltraWebGrid

Looking at grid’s HTML markup I noticed that it set the caption to an empty string (showing code for one column):

<igtbl:UltraGridColumn HeaderText="">
   <Header Caption="">
   </Header>
</igtbl:UltraGridColumn>

Apparently it’s a new behavior in Infragistics 9.x to substitute empty captions with default column names. The solution is to set caption to a single space which, while invisible, is considered a real text caption and is not substituted by anything:

<igtbl:UltraGridColumn>
   <Header Caption=" ">
   </Header>
</igtbl:UltraGridColumn>

The result:

Correct look of UltraWebGrid