Recently I had the requirement to provide the functionality of drag and drop rows and decided to use one of the jQuery plugins to aid in doing that. One thing I had noticed though is that these plugins require that your gridview be rendered out using ‘thead’ for the header row and ‘tbody’ for the content rows.
By default the gridview does not do this, however, you can force it to do so using this bit of code:
gridview1.HeaderRow.TableSection = TableRowSection.TableHeader;
The above code renders the grid using the required thead and tbody tags.
You may have partitioned your disks so as to keep all your OS related files on the C drive and applications as well as their data on another partition. Unfortunately, by default Google Desktop Search stores its data in the ”C:\Documents and Settings\<username>\Local Settings\Application Data\Google\Google Desktop” folder. If you look at the size of this folder (that contains the Google Desktop Search Indexes), you will notice that it eats up quite a chunk of disk space.
So you want to move the location that it stores data to another drive/partition, but there isn’t a setting to do so. You can get around this by following these instructions:
- Close any instances of Google Desktop Search that are currently running. (Make sure by checking the processes in your task manager and seeing that GoogleDesktop.exe is not one of the running processes.
- Copy the folder “Google Desktop” which is in your “C:\Documents and Settings\<username>\Local Settings\Application Data\Google\” folder to where you want the index files to be (Ex: D:\Google Indexes\)
- Start -> Run -> Regedit.exe
- Browse to the location “HKEY_CURRENT_USER\Software\Google\Google Desktop”.
- On the right side, you should see an entry for ”data_dir”
- Change the value held in “data_dir” (by double clicking on it) to your new location for the Google Desktop Search Files (Ex: D:\Google Indexes\Google Desktop\<subfolder within this>)
- Click ‘Ok’ to save the changes.
You should now be good to go. All you have to do is start up Google Desktop Search and it should now be saving indexes to the new location.
If all goes fine, go ahead and delete the files stored in your local settings (C:\Documents and Settings\<username>\Local Settings\Application Data\Google\) and free up some of that space.
99% of all web applications use the familiar “Sign In” and “Log out” to allow users to gain access to their site. The other 1% use a myriad of techniques, one of which I’ve noticed growing in popularity. To me, this new technique (which I call “Not Me”) is far from providing a good user experience. I mean.. It is me, its just that I want to log out. How exactly does “Not Me” translate to simplicity?
Two rather well known sites I’ve seen implement the “Not Me” scheme are Amazon.com and Buy.com. The first flaw I would note on Amazon is not having the “Sign In” link hyperlinked. Instead, they have a “personalized recommendations” link, which when clicked on, takes you to the sign in page. On first look, its kind of misleading and doesn’t let you know where to click on, to sign in to Amazon.

So you finally made your way to the sign in and are done shopping and/or browsing around. You entered your credit card details and shopped till your hearts content. Where do I log out now? There is nothing that hints to you that “not being you” is the way to log off. Well, agreed log out is not exactly friendly to those who don’t use the web a lot (which by today’s standards are a handful of people). But come on… Is ‘Not Me’ the best you can do?


You’ve got to be kidding me!
A few days ago, I needed to create a database diagram out of a few tables in the database, and I was surprised when I was not able to. Everytime I clicked on the ‘Database Diagrams’ subfolder of the database in the database tree, I was met with the following error message:

The error message says that “Database diagram support objects cannot be installed because this database does not have a valid owner”. It then proceeds to ask you to alter authorization of the database owner to a valid owner using the Files page of the Database Properties.
Following the steps in the error message doesn’t seem to get around the problem, or at least in my case it did not. I tried changing the owner to another login, and that just did not do it.
Then I noticed something, on the ‘Options’ page, the ‘Compatibility Level’ was set to ‘SQL Server 2000′ rather than ‘SQL Server 2005′.

Changing it to the right version of SQL Server seems to eliminate the problem. So if you come across this problem and you’ve tried giving the appropriate authorizations, go ahead and change the ‘Compatibility Level’. Once this is done, try expanding the ‘Database Diagrams’ node and it will ask you to install some support objects. Go ahead and accept it. You should now be able to create database diagrams.

If you have been a long time user of Google Desktop Search and now seem to find it difficult to live without it, you might have been disappointed to see that you can no longer install it on the 64 bit version of Vista. However, there is a workaround for this. Here are the steps to install it on your 64 bit machine.
- Download Google Desktop Search.
- Start->Run->cmd (basically open a command prompt)
- In the command prompt change directory to the location where you have downloaded google desktop search.
- Type “GoogleDesktopSetup.exe /force” on the command line to start up the installation.
- Follow through the installation.
I’ve heard that some of the functionality is disabled, but I haven’t really experienced anything as such so I’m not sure whether or not that is the case. Well, I’m happy so long as I have Google Desktop Search up and running on my system again
Many people have asked me for a copy of my rebuilt AjaxControlToolkit DLL which contains a fix for the modalpopupextender in it, so I thought I would write a post describing how I went about re-building the DLL (for those wanting to try).
The first thing you need is the source code of the AjaxControlToolkit. Head over to the releases tab on the AjaxControlToolkit CodePlex Page. Now, what I’m using is an older version of the toolkit, but the steps should probably be the same even in the latest version.

Go ahead and download the source code version of the toolkit.

Extract it and open the AjaxControlToolkit.sln file to bring up the project in visual studio.
Now notice that in your directory structure there is a folder called SampleWebSite\Bin. These is where the compiled version of your DLL is going to be.
Now go ahead and make the necessary changes to the files in the toolkit (I’ve written them out in a previous post here).
Right click on the Solution and choose ‘Build Solution’.

That’s about it. You should have your newly built DLL in the SampleWebSite\Bin folder.
December 5th, 2008 in
Uncategorized |
2 Comments
Ever had the problem that one day you logged into your wordpress blog and checked your stats, only to be shocked that your hits are flat lining? Well, I was, and it recently happened (after a theme change). So after a little investigation, I figured out the answer to the problem. The reason is that your footer.php no longer contains the call to the function wp_footer();.
I’m not sure if there are other reasons as to why it may fail, but this is the reason I saw it failing in my case. So first check your footer.php for the existence of the call to wp_footer(). If it exists, then your problem lies elsewhere. If it does not exist, then to solve it just put in the following code:
just above the </body> tag in your page.
One reason why it suddenly started flat lining might be because you changed your theme, and the new theme is missing that function call. I’m not sure I can think of any other reasons besides that. I’ve read some places stating that an upgrade of wordpress caused it, but I would imagine that it failed because the upgrade to a newer version of wordpress also caused a theme change.
September 21st, 2008 in
Blog | tags:
plugins,
wordpress |
2 Comments
You want to know why even though you followed the rulebook your autocompleteextender just won’t make a call to your webservice? Read on…
So you want to use the autocompleteextender that comes with the AjaxControlToolkit. You go to the demo site (www.ajaxcontroltoolkit.com) and follow their extact instructions.
Place a nice textbox on your page like so:
<asp:TextBox id="txtMyTextBox" runat="server" />
With a good scriptmanager like so:
<asp:ScriptManager ID="ScriptManager1" runat="server" >
<Services>
<asp:ServiceReference Path="MyWebService.asmx" />
</Services>
</asp:ScriptManager>
and your beloved autocompleteextender like so:
<cc1:AutoCompleteExtender ID="autocompleteextender1" runat="server" TargetControlID="txtMyTextBox"
ServiceMethod="MyWebMethod" ServicePath="MyWebService.asmx"
UseContextKey="true" CompletionSetCount="10" EnableViewState="false"></cc1:AutoCompleteExtender>
You have your code behind as simple as can be:
[System.Web.Script.Services.ScriptService]
public class UtilityService : System.Web.Services.WebService
{
[WebMethod(EnableSession = true)]
public string[] GetCustomerList(string prefix, int count)
{
//Your code to return a string[] list goes here;
}
}
You run your code waiting for the magic to happen, but nothing does. So you think your webmethod is not returning the list it should. Want to debug it? Go ahead and place a breakpoint, I’ll wait. Did it break?
If it did, then you are lucky and you followed their website to the T (which also means your problem is not what I’m writing about). If it didn’t, then here is your problem…
Your method signature should be:
public string[] MyMethod(string prefixText, int count)
NOT
public string[] MyMethod(string anyothervariable, int count)
Your variable HAS to be called “prefixText”
I thought it was strange as well, and I wasted 2 hours trying to figure that out. Its frustating as hell!
August 28th, 2008 in
Uncategorized |
11 Comments
Windows is not particularly friendly with resources and there are many programs that don’t release them. Files get stuck with programs and when you want to delete them Windows throws up an ugly message which looks something like this.

“Cannot Delete XYZ-File: The files are being used by the following program: Program Name. You must close the file before proceeding”
You know that you don’t have the file open, but according to Windows, you do. That’s where this handy little utility called unlocker comes in. It isn’t guaranteed to work all the time, but most of the time it will get you out of the jam, or at the least tell you what it is that’s holding Windows back from operating on the file/folder.
When such an error message pops up, Unlocker brings up this dialog which allows you to do a couple of things. You could take no action, copy the file, delete the file or unlock the file. You could also kill the process that currently is holding the file.

I’ve run in to problems many times myself and have had this utility save me. One more good tool to add to the tool chest.
June 5th, 2008 in
Software |
No Comments
As of this posting (May 29th 2008 4:51 PM), Google is down and has been that way for probably the past 45 minutes as I’ve noticed it. I Yahoo’d to find out any news about Google going down, but to no avail. I decided to then write to Techcrunch/ReadWriteWeb, because they are people who have sources to obtain such information (at least far better than what I can). Probably will be up on their blogs in a while.
What I wanted to point out is, we are so Google dependant that in the time it was down, I had no way to contact either blogs to let them know it is down (although I think they already do know it, since a lot of their work requires some kinds of research and they would most probably be using Google for it).
As of now, I can’t get access to my feeds, my e-mail, my notebook, orkut, or regular good old search. Is this time to start Yahooing or Liv(e)ing? What is surprising though is that even though Gmail is not working, GTalk is, and it even reports the number of e-mails I have unread.
Update (May 29th 2008 5:05 PM): Google is back up but behaving very erratically.
Update (May 29th 2008 5:30 PM): Google seems to be back up and at it.
May 29th, 2008 in
Google,
Internet |
1 Comment