KingMaker
KingMaker

Reputation: 309

setting cell in jqgrid

I want to set an html object to the cell in jqgrid..

i will get the cell object with this:

 var cell = jQuery('#tree').jqGrid('getCell', rowID, 'name');

after changing few properties of cell i want to place it back..Is there any way to do this

I am doing this in the following way but its not setting it properly..

var myCell = "<td aria-describedby='tree_name' title='"+name+"' style='18px' role='gridcell'>"+
                        "<div class='tree-wrap tree-wrap-ltr' style='width: 0px'>"+
                        "<div class='ui-icon ui-icon-radio-off tree-leaf treeclick' style='left: 0px'></div>"+
                        "</div>"+
                        "<span class='cell-wrapperleaf'>"+name+"</span>"+
                        "</td>"
        jQuery("#tree").setCell (rowID,3,myCell,{});

Upvotes: 0

Views: 880

Answers (1)

Oleg
Oleg

Reputation: 221997

The value of the cell must be innerHTML of the cell and not outerHTML. So you should remove from the myCell the <td ... and the </td> parts.

Upvotes: 1

Related Questions