ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: neoinbiz on September 11, 2019, 11:49:00 pm
-
I have a field that has multiple values and when it returns the values it words wraps
I want carriage return for each value that is separated by "|".
Ultimately just carriage return each value minus the "|".
-
"|" can be replaced with "<br/>" in column.render callback
render: function(ui){
return ui.cellData.replace(/\|/g,"<br/>");
}
-
Thank you for the reply
I get this error "Unable to get property 'replace' of undefined or null reference"
{ title: "Deployed Location", width: 200, dataIndx: "DeployedLocations", hidden: hideLoc, /*hideLoc uses the varible from the dropdown list deployedLoc and the condtion is around Line#312*/
filter: { type: "textbox",
condition: 'contain',
listeners: ['keyup']
},
render: function(ui){
return ui.cellData.replace(/\|/g,"<br/>");
}
},
-
It can be modified to take care of null / undefined values. Hope you have understood the concept and make changes according to the field values in your column.
render: function(ui){
return (ui.cellData || "").replace(/\|/g,"<br/>");
}