[Vuejs]-How to navigate to another page with id param on Ag-grid?

2👍

This worked for me. I hope it might work for you as well.

{
          headerName: "ID",
          field: "idvalue",
          cellRenderer: params => {
            const route = {
              name: "editpage",  // name will be same as stated in the route by you
              params: { id: params.value } 
            };

            const link = document.createElement("a");
            link.href = this.$router.resolve(route).href;
            link.innerText = params.value;
            link.addEventListener("click", e => {
              e.preventDefault();
              this.$router.push(route);
            });
            return link;
          }
},

Leave a comment