Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Kiran on Sep 25, 2007 16:09
open dhtmlx forum
trouble with suggested solution for using custom javascript in link solution

I tried to follow one of the solutions suggested in an other post to use Link^javascript:xxx() approach. I understand that this approach uses the delimiter '^' to seperate the link from the javascript. Hoever, my link text itself can contain the '^' character in which case the suggested solution is falling apart.

An other solution to directly embed <a href=.. as xml string is also not feasible as the sorting would fail based on href strings instead of the actual hyperlink.

Is there any other way to solve the problem. We have bought professional license. Thanks.
Answer posted on Sep 25, 2007 18:42
>> in which case the suggested solution is falling apart.
There are two possible ways

a) update code of dhtmxlgrid_excell_link.js

...
var valsAr = val.split("^");
...

you can replace split char with any other which will be more unique in your case

b) You can replace direct js links with global event handler

mygrid.setOnRowSelectHandler(function(rid,cindex){
    alert("row " + rid+ " column + " + cindex " was clicked");
}, true);