ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: logibricks on November 19, 2018, 06:08:48 pm
-
multiline text in cell showing <br> on cell hover mode. We have used render function for hovering on cell text.
Thanks
Aditya
-
Aditya
Please share your implementation code so that it can be checked.
-
render: function(ui) {
if (!ui.other) {
if(ui.rowData[ui.dataIndx] != undefined){
return '<span title=\'' + ui.rowData[ui.dataIndx] + '\'>' + ui.rowData[ui.dataIndx] + '</span>';
}
}
}
-
Please update your render function to
render: function(ui) {
if (!ui.other) {
if(ui.cellData != undefined){
return '<span title=\'' + ui.cellData.replace("\n","
") + '\'>' + ui.cellData + '</span>';
}
}
}
As this question is not directly related to grid, but to HTML title attribute in general, please refer these links for more info:
https://stackoverflow.com/questions/18606877/how-can-i-new-newline-in-title-attribute-in-html/18612227
https://stackoverflow.com/questions/358874/how-can-i-use-a-carriage-return-in-a-html-tooltip
-
render: function(ui) {
if (!ui.other) {
if(ui.cellData != undefined){
return '<span title=\'' + ui.cellData.replace(/\n/g,"
") + '\'>' + ui.cellData + '</span>';
}
}
}
There is a slight change in the code provided by you. And it is Working fine.