Prevent selection when I just click the link in the cell?

The grid is with row selection.
If I click any part of the row, the row is selected.
But Is it possible not to be selected when I click the A link?

the column is defined like this
{
header: ‘Customer’
id: “cp_name”,
css: ‘left’,
sort: “server”,
width: 120,
template: “<a href=‘javascript:void(0)’ onclick=“g_view_customer.call_show_customer_common_dlg(’#cs_id#’, ‘’)”>#cp_name#”
},

  • I added e.preventDefault() in the onclick. but it doesn’t work.

Thank you in advance.

You can use e.cancelBubble = true;

Also, the more structured way to define the same will be to use

{
  header: 'Customer'
  id: "cp_name",
  css: 'left',
  sort: "server",
  width: 120,
  template: "<a class='name_cell'>#cp_name#</a>",
  onClick:{
    name_cell: function(id, ev){
              g_view_customer.call_show_customer_common_dlg(id);
              return false;
    }
  }
},