jquery - How to change Html of a particular cell in jqGrid? -


in jqgrid implementation, have subgrid dropdown , want change icon in cell on change of dropdown. have used formatter generate icons shown in picture below. want add/remove icon images cell. possible do? i'd appreciate help/ideas that? using jqgrid asp .net in project.

enter image description here

function formatactiongridicons(cellvalue, options, rowobject) {     if (cellvalue.indexof("_") == -1) return '';      var arr = cellvalue.split('_');      var icon1 = arr[0];     var icon2 = arr[1];     var icon3 = arr[2];      //if (icon1 == "r")     var cellhtml = geticonhtml(icon1) + geticonhtml(icon2) + geticonhtml(icon3);      return cellhtml;  } function geticonhtml(icon) {     if (icon == null || icon == "") return "";     var result = geticonpath(icon);     if (typeof (result) === "undefined" || result == "")         return "";     else          return "<img src='" + geticonpath(icon) + "' width='18px' height='18px' />"; } function unformatactiongridicons(cellvalue, options, cellobject) {     return $(cellobject.html()).attr("originalvalue"); } 

you can use setcell modify cell icons. calls internally formatter of cell generate html fragment set in grid. need use same format of data setcell 3-d parameter use in input of grid.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -