0

The onselectRow link works, but it overrides the formatter link.

If I comment out the OnSelect location, the formatter link works. Otherwise, the formatter link doesn't work. Anyway around that?

thanks

onSelectRow: function(row_id) {
location.href="/blah/"+aId;
},

But if it's enabled, it overrides this link:

{name:'ID',index:'ID',formatter:pbf, width: 90,align: "center", fixed: true,sortable:false,resizable:false}

gridComplete: function() {
        $('span[name="pay"]').click(function() {
    location.href='/ew/'+ad;              
     }


function pbf(cellvalue, options, rowObject){    
var pay = '<span name="pay" id="'+rowObject.ID+'" class="ui-icon ui-icon-check" style="margin-left: 10px; margin-top: -3px; float: left"></span>';
   return pay;

}

shef
  • 23
  • 1
  • 4
  • It's not clear what you want to do. Setting `window.location.href` in both `onSelectRow` and `$('span[name="pay"]').click` has no sense. Probably you need something like described [here](http://stackoverflow.com/a/13765086/315935)? You can use either `beforeSelectRow` or `onCellSelect` to implement `click` callback **without** binding `click` handler to `span` of every cell in the column. See [here](http://stackoverflow.com/a/5305904/315935) for some additional information. – Oleg Dec 12 '12 at 20:52
  • thanks for the quick response. I have icons in the last cell, and they each have distinct links. But I want all the rest of the row to have its own separate link. But I guess by design the onSelectRow overrides the icons links, as they are in the row. – shef Dec 12 '12 at 22:23
  • You are welcome! I hope it will help you. – Oleg Dec 12 '12 at 22:24

0 Answers0