tags:

views:

613

answers:

2

hai i am very new to jquery and jqgrid.. i have implemented a grid...but i don't have any idea to display images in column from the corresponding database value...i tried a lot but failed ..can anybody help me.. regards

A: 

In the setup parameters add:

            loadComplete: function() {
              var ids = $("#list").getDataIDs();
              for (var i = 0; i < ids.length; i++) {
                var cl = ids[i];
                be = "<img src='http://www.google.com/images/nav_logo6.png'&gt;";
                $("#list").setRowData(ids[i], { externalId: be })
              }
            },

In this example it will load the google logo. This sample goes over all the rows and adds the same item. You can change it do be more dynamic based on the current value of the cell etc.

Ron Harlev
A: 

thanks bro... thanks 4 ur help..and its works fine

Happy to help. Note though, that responses like that should be added as comment (like this one), and not as answers
Ron Harlev