I got a question to PocketQuery, which is by the way a very cool tool.
In documentation is written that when using standard template, columns are resizable by dragging the markers between the columns. That doesn't work in all browsers I've tried (IE, Firefox, Chrome).
Is there a way to adjust the size of a column in another way (template?).
Hello,
I have the same problem as you.
Have your solve your problem, and if yes how ?
Thanks in advance for your answer.
We made a custom template:
<style>
.testtable {
border-collapse: collapse;
}
.testtable th, .testtable td {
border: 1px solid black;
padding: 7px;
text-align: left;
table-layout: auto;
}
</style>
<table class="testtable">
<tr>
#foreach ($column in $columns)
<th class="col-$velocityCount">$!column</th>
#end
</tr>
#foreach ($row in $result)
<tr class="#if($velocityCount % 2 != 0)odd#{else}even#end">
#foreach ($column in $row)
<td class="col-$velocityCount">$!column</td>
#end
</tr>
#end
</table>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Super, that work very fine. Thanks a lot !
With this Template, I have no more sorting of the column (click on the column name), and the grey color of the title rows disappeared.
Do you have the code for that 2 features ?
Thanks in advance for your answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've made a custom template and copied your lines. But it does not work. I also changed param to true. But that didn't work either. What is wrong.
I am also more interested having best fit column sizes. At the moment all columns have the same width regardless of which content there is. That leads to the problem that some columns are to wide because the is only short content and others are cut. Are there ways that column width is handled automatically best to content?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
Thanks, glad you hear you like PocketQuery! We removed the resizable columns from the defaults. Please use a custom template like this:
## @param colresizable:true $PocketQuery.template("default")
Let me know if this helps!
Regards, Felix (Scandio)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your help:
I've made a custom template and copied your lines. But it does not work. I also changed param to true. But that didn't work either. What is wrong.
I am also more interested having best fit column sizes. At the moment all columns have the same width regardless of which content there is. That leads to the problem that some columns are to wide because the is only short content and others are cut. Are there ways that column width is handled automatically best to content?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Strange. For me it works perfectly. I simply used the template I posted above:
cast-colresizable.gif
I think you should simply research how to format your table with CSS in the PocketQuery template in a <style> tag. This article could be an entry point.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.