I used to have the previous version of ignite ui (2012). I had a grid that was functional with no problems.
columns: [ { headerText: headerTextValues[0], key: "cntID", hidden: true }, { headerText: headerTextValues[1], key: "cntAKA", width: 250, template: "<a class='editDialog' href='Home/ManageContact?cntID=${cntID}&command=edit'>${cntAKA}</a>" }, //{ headerText: headerTextValues[2], key: "cntRelation", width: 250, template: "<a href='Home/ManageContact?cntID=${cntID}&command=edit' class='editDialog'>${cntRelation}</a>" }, //{ headerText: headerTextValues[2], key: "cntRelation", width: 250, template: "<a href='javascript;' onclick='return show_more_menu(); class='editDialog'>${cntRelation}</a>" }, { headerText: headerTextValues[2], key: "cntRelation", width: 250, template: "<a href='Home/ManageContact?cntID=${cntID}&command=edit' class='editDialog'>${cntRelation}</a>" },
//{ headerText: headerTextValues[3], key: "cntRelation", hidden: true, width: 250, template: "<a href='FullPage/ManageContactInternal?cntID=${cntID}&command=edit' class='editDialogInternal'>${cntRelation}</a>" }, //{ headerText: headerTextValues[3], key: "hrefUrlTest", width: 250 }, ],
I had a link in the template as shown in the code above.
When I upgraded igniteui to the latest version (2014), the link is no longer functional.
I tried the link as a standalone (outside of the grid template) and it works with no problems but when trying it in the iggrid template it doesn't work.
Sonia
Hello Sonia,
I am glad I was able to help! Please, let me know if you have any other questions or concerns!
Best regards,
Stamen Stoychev
Hi Stamen ,
Thank you.
It worked.
Regards
Thank you for your answer.
I will try this and let you know.
Please find a working sample attached. The way you were binding to the click events for the links had to be changed as they were not present at the time of binding. Alternatively you can move the event binding inside document.ready, just after the grid definition. I am not sure how this code would work in 12.1 or 12.2 but I assume you were using the now deprecated jQuery.delegate instead.
I hope this helps! Please, let me know if you have any other questions or concerns!
Hi Stamen,
Thank you for your prompt answer.
The link and code are correct because I didn't change them. They used to work with no problems before upgrading igniteui.
I wanted to track the error and find where is it exactly and I could identified. The problem is that the link wrote in the template has a class/id, when I try to refer to that class/id from a simple jquery script from outside the definition of the grid, this class/id is not detected.
I attached a sample.
In my example I created a template that calls the http://google.ca (column 1) and another one that calls an action from the controller (column 2)
The links work fine when clicked but the problem is that when I want to refer to the <a></a> tag using its class/id and write a simple alert message (please check the end of the code attached) when that link is clicked, this is not possible. I want to mention again that I start having this problem after upgrading the ignite ui.
Please let me know if I need to explain more.