Showing posts with label Webgrid progress indicator. Show all posts
Showing posts with label Webgrid progress indicator. Show all posts

Monday, January 4, 2010

How to disable the default progress image of Infragistics webgrid

Hi, today I faced a unique challenge and that was to disable the default progress image on the Infragistics webgrid. Now if you try to sort the column by clicking on its header you see a small image in the middle of the grid...thats the progress image am talking about.

In my case the requirement was to show a custom progress-bar image, so I had to disable the default one.
Heres what I did.

1. Call a method from the InitializeLayout() of the grid on the server-side
Eg:- e.Layout.ClientSideScript.InitializeLayoutHandler =

2. Now the method signature in this case takes two arguments by default, thats comes pre-defined from Infragistics. The first parameter is the grid-name and the second is the columnID. So if your method name is DisableImage, then its signature in the javascript file will look like this

function DisableImage(gridName, colID)
{ }

3. Now what code should I use ??? This is the most important part. Use the code below as-is and your problem is solved

var oGrid = igtbl_getGridByID(gridName);
oGrid.DisableProgressIndicator();

Wholla done !!!!