ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: eastofthesun882 on February 03, 2016, 06:02:35 pm

Title: Multiple return statements from function
Post by: eastofthesun882 on February 03, 2016, 06:02:35 pm
Hi

Trying to return multiple statements...

...
render: function (ui) {
                    if (ui.cellData != ""){
                        if (ui.cellData < 10 )
                    {
                    return style: "font-weight:bold";
                    return ui.cellData + "$";
}
}               
}
...

How should that be handled?
Title: Re: Multiple return statements from function
Post by: paramvir on February 03, 2016, 06:31:28 pm
There can be only one return statement.

for basic version it's

return "<span style='font-weight:bold;'>" +  ui.cellData + "$</span>";
Title: Re: Multiple return statements from function
Post by: eastofthesun882 on February 03, 2016, 07:31:24 pm
Thanks!