Wednesday 17 March 2021

Ag grid group by complex object link

Due to some requirements I need to render in ag grid links in some columns. I am able to do it using cellRenderer but when the grouping is used I have only access to string not whole object. At the moment I am using this code for rendering but I would like to somehow render proper link in if as well. Now I have:

function cellRenderer(params) {
  if (params.node.group) {
    return params.value;
  }

  return '<a href=' + params.value.code + '>' + params.value.name + '</a>';
}

But I would like to have something like that but its not working:

function cellRenderer(params) {
  return '<a href=' + params.value.code + '>' + params.value.name + '</a>';
}

Example on Plunker

So no way to render proper link for grouping cell. Anyone has solution to that?



from Ag grid group by complex object link

No comments:

Post a Comment