Blogger Widgets
  • Sharing Photos using SignalR
  • TFS Extenstion - allows copy work items between projects
  • Displaying jquery progressbar with ajax call on a modal dialog
  • Managing windows services of a server via a website
  • Exploring technologies available to date. TechCipher is one place that any professional would like to visit, either to get an overview or to have better understanding.

Search This Blog

Thursday, 11 November 2010

Display Icons in JQGrid

JQGrid is one of the best plug-in to display data as grid. Using JQGrid is very simple and easy to use. In this article we will look into displaying icons in JQGrid.

Consider the following code that makes an ajax call:

 datatype: "json",
    colNames:['ID','Team', 'Name', 'Designation'],
     {name:'id',index:'id', width:55},
     {name:'Icon',index:'Icon', width:90},
     {name:'name',index:'name asc, invdate', width:100},
     {name:'designation',index:'designation', width:80}],
    pager: '#pager',
    sortname: 'id',
    viewrecords: true,
    sortorder: "desc",
    caption:"JSON Data"

The return data from the GetDetails.asmx should be in json format and the data should look like :-


The data cell value should contain an image location so that JQGrid will render and display an image in the grid.

“Tell me and I forget. Teach me and I remember. Involve me and I learn.”
– Benjamin Franklin


Copyright © 2013 Template Doctor . Designed by Malith Madushanka - Cool Blogger Tutorials | Code by CBT | Images by by HQ Wallpapers