0

Pivot table - Resizable columns?

asked 2011-05-11 11:28:56 +0800

cyiannoulis gravatar image cyiannoulis
1201 10

Hi,

Currently we evaluate the pivottable component and i must say we are very impressed! The only thing i would like to ask is if there is any way to make the columns resizable.

Thank you all

delete flag offensive retag edit

10 Replies

Sort by ยป oldest newest

answered 2011-05-17 06:35:26 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

Hi cyiannoulis,
The column size was decide on server side renderer, it cannot be modified in client side.

link publish delete flag offensive edit

answered 2011-05-20 09:50:11 +0800

cyiannoulis gravatar image cyiannoulis
1201 10

Thank you jimmy for your reply. Actually i don't want to resize the columns on the client side but i cannot find which method to call to adjust the width of the columns. Also i would like to know if there is any pricing model for the pivot table module or it is free for the CE users?

Thank you

link publish delete flag offensive edit

answered 2011-05-25 23:04:10 +0800

jeanher gravatar image jeanher
1824 2 6
ZK Team

Hi cyiannoulis,

Pivottable is in its beta and the licensing model is not finalized yet.
It's most likely available under both open source license and commercial license like other components.

link publish delete flag offensive edit

answered 2011-05-25 23:13:43 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

You can define the size by override getColumnSize.

link publish delete flag offensive edit

answered 2011-05-26 07:42:49 +0800

cyiannoulis gravatar image cyiannoulis
1201 10

Thank you very much guys!

link publish delete flag offensive edit

answered 2012-08-24 02:44:16 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

The client column sizing available since ZK Pivottable 2.0.0
http://www.zkoss.org/product/zkpivottable/releasenote/2.0

link publish delete flag offensive edit

answered 2012-09-19 08:48:56 +0800

Bolat gravatar image Bolat
6

Hello, jimmyshiau

How can I resize a column on client side? (zk-pivottable-bin-eval-2.0.0)

link publish delete flag offensive edit

answered 2012-10-01 01:38:57 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

Hi Bolat

The column of Pivottable 2.0.0 are sizeable by default, you can try to hover on the column and use mouse drag to resize.

link publish delete flag offensive edit

answered 2012-10-22 20:12:44 +0800

pijc gravatar image pijc
15

I know column headers are resizable by default in Pivottable 2.0, but how can you make the columns showing the row headers resizable as well? Using the pivot table example from the release notes, how could you make it so the user can resize the first row header (with "Antonio Mattos", "Becky Schafter", and "Carlene Valone") and second row header (With "Albert..", "Euncie", "Jessica.." and so on) so that they can read the entire contents of those cells?

My first guess was to give the rows div the sizable="true" attribute, but since the Div class doesn't have a setSizable method, that doesn't work.

<pivottable style="border:0px" id="pivot" hflex="1" >
  <div />
  <div sizable="true">Columns</div>
  <div >Rows</div>
</pivottable>

As shown below, I can use the getColumnSize method of a SimplePivotRender child to make the rows for certain fields be a set width. That works when just one field is set to display as a row header, but when multiple fields are set as row headers, the set size gets ignored and the header cell contents get cropped off.

public PivotRenderer getRenderer()
{
  return  new SimplePivotRenderer() 
{
    if(dataField.getType().toString().equals("ROW"))
    {
      if(dataField.getFieldName().equals("Name")) 
        return 300;
      else 
        return 100;
    }
  }
}


I hope there is an easy method or attribute I am missing to allow the row header columns to be re-sized like the standard column headers currently are.

link publish delete flag offensive edit

answered 2012-10-23 08:18:24 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

Hi pijc,

The left row column sizable is not support now, you can post a feature request
http://tracker.zkoss.org/browse/ZKPVT

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-05-11 11:28:56 +0800

Seen: 637 times

Last updated: Oct 23 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More