Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow content in setSqlExp #898

Open
widgetinc opened this issue Aug 10, 2016 · 0 comments
Open

Allow content in setSqlExp #898

widgetinc opened this issue Aug 10, 2016 · 0 comments

Comments

@widgetinc
Copy link

widgetinc commented Aug 10, 2016

If I have a table and I want a styled aggregate row at the bottom I can use (for example):

$grid->setSqlExp (array ("rowname", array ("functions" => array ("sum"), "class" => "mystyles")));

But if I have a column that is text and one that is a number and I only want to aggregate the number field and leave the total field blank (or put some other text in it) then I have to use:

$grid->setSqlExp (array (
"textrow1", array ("functions" => array ("sum"), "decorator" => "", "class" => "mystyles"),
"textrow2", array ("functions" => array ("sum"), "decorator" => "Static Text", "class" => "mystyles"),
"numrow", array ("functions" => array ("sum"), "class" => "mystyles")
));

This makes the "functions" condition entirely irrelevant. It would be nicer if I could omit that field or, even better, define a "content" field and, if I want the field blank, omit the "decorator" field, too, like this:

$grid->setSqlExp (array (
"textrow1", array ("class" => "mystyles"),
"textrow2", array ("content" => "Static Text", "class" => "mystyles"),
"numrow", array ("functions" => array ("sum"), "class" => "mystyles")
));

Or am I doing it wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant