Nitobi
Customer Login
Services
Products
About
Blogs
Contact
Home -> Product Knowledgebase Order Online | Free Trial Downloads

Nitobi Product Knowledgebase

Troubleshooting Grid V3


Setting up your Grid implementation should go smoothly. However, like all software, there are places where things can go wrong. Here are specific instructions for troubleshooting common problems.

General Troubleshooting Approaches

There are some good general techniques from troubleshooting Ajax problems which apply to not just Nitobi components, but all JavaScript and Ajax software. Here are a couple of the things you should try first:

Use Proxy Tracing (Microsoft Fiddler)

A good proxy tracing tool like Microsoft Fiddler will help you detect problems in your server code, even if you dont see any visible sign of problems in the browser. This is probably the single most useful development tool for Ajax. We are maintaining a detailed explanation of debugging with Fiddler here in our knowledgebase. Click here to read it (highly recommended). Alternatively you can get the printable version.

Use a JavaScript Debugger

There are some good JavaScript debuggers available that can really shorten development time in the way that desktop debuggers do. One is Venkman (for Mozilla / Firefox), and another is the MS Script Debugger (for IE).

Common Problems

Problem: The Grid doesn't appear or won't initialize.

1. Solution: Namespace isn't defined.

The html page where the grid tag appears must contain the Nitobi namespace. put this in the tag at the top of the page. Eg:

<HTML xmlns:ntb>

2. Solution: JavaScript component isn't loading.

For some reason, the nitobi.grid.js component might not be loading. Is it referenced correctly? Is the client browser Internet Explorer 5.5 or newer?

3. Solution: nitobi.loadComponent is not called.

When the page is loaded, nitobi.loadComponent must be called. In your tag, use the onLoad property to call nitobi.loadComponent, either directly, or through a JavaScript function. Eg:

<body onLoad="nitobi.loadComponent('gridId');">

4. Solution: Improperly defined Grid Tag

An incorrectly defined HTML Grid tag may cause the grid to not appear. Consult the included demos for an example of a properly formed grid tag.

Problem: The Grid appears distorted.

1. Solution: Missing or incorrectly Referenced Style Sheet

This is probably due to the stylesheet being incorrectly referenced. Did you copy the styles into your application folder? Here is an example of a correct CSS reference appearing in the tag of your page:

<LINK class=BodyText rel=nofollow href="styles/default/nitobi.grid.css" type=text/css rel=stylesheet>

2. Solution: There is a DOCTYPE declaration on the page

Currently, the Grid does not work in standards mode, only quirks mode.  If you have a DOCTYPE declaration on your page, you should remove it.

Problem: The Grid has no data in it.

1. Solution: Grid columns not bound to data columns

Every column in the grid must reference (with the property xdatafld) a column of data in the datasource.

2. Solution: There is a problem with the getHandler.

To see if the getHandler is working correctly, try calling directly in your browser. If your getHandler is gethandler.asp, simply call it in your browser window and then View Source. You should see a properly formatted XML stream like this:

<xml?>
<root fields="client|service|quantity" keys="client|service|quantity">
     <e xk="1" a="3" b="security" c="5299.22" />
     <e xk="2" a="2" b="catering" c="30.00"  />
     <e xk="3" a="2" b="security" c="889.00"  />
     <e xk="4" a="2" b="security more" c="999.00"  />
     <e xk="5" a="1" b="catering" c="20.00"  />
</root>

If not, you will probably get a server error. Check your file permissions and troubleshoot the script as you would any other. Refer to the server-side XML API documentation included with the Grid.

Problem: The Grid wont save.

1. Solution: You don't have the file permissions!

First and foremost, you should check your file permissions. By default, the included samples may not have appropriate file permissions required in order to save your data. In Windows, you should right click on the database, hit properties and check that: a) The database is not Read-Only - b) In the Security tab, the user "Everyone" has Full Control over reading and writing.

2. Solution: There is another problem with your save handler!

Any number of things could be wrong with the save handler. The trouble with debugging them is you must deliver an XML updategram and view the results to see what is happening. The best way to do this is to use Fiddler to view the response from the server.

Related Articles

View Printable Version

Comments:


Name:

Type the text you see above:

Comments:


Knowledgebase

To be notified of new articles when they're available, subscribe to our RSS feed.

Support Resources

Take advantage of our knowledgebase of product tutorials and tips, and our support forums!

Search Site


Sign up for our Newsletter:

Get industry articles and Nitobi company news in your inbox every couple of months — here's a sample!

Email:




Site RSS Feed  | All contents are (c) Copyright 2006, Nitobi Software Inc. All rights Reserved