Hi Stéphane, I'm not sure how ColumnGroups solve the problem of screen real estate? The same amount of columns are still rendered in the end right?
If you want to show/hide columns isn't JavaScript[1] a more appropriate tool? Kind regards Bob [1]: http://p.sohei.org/stuff/jquery/columnmanager/demo/demo.html On 5/11/2010 21:30, Stéphane NICOLAS wrote: > Allo, > > I would like to suggest a first idea that seems not so difficult to implement > in click : column groups. > > /Idea :/ > > When I developped my first click app, I had to build a few list views using > tables. > When tables become large, I think it s a good design to have the ability to > hide/unhide columns to > increase the readability of data as it increases focus on the most meaning > full part of them. > > Nevertheless, all the time the fields of items to expose in the list were > grouped. The idea is > nothing new, it's exactly what field sets have been designed for. > > So I suggest that we had column groups in tables to mimic the behavior of > fields set for forms, but > in tables. > > /API : > > /It would be nice to have an interface like this : > ColumnGroup groupPersonalData = new ColumnGroup( <name>, <label> ); > Column columnName = new Column( <name>, <label>); > Column columnPhone = new Column( <name>, <label>); > > groupPersonalData.add( columnName ); > groupPersonalData.add( columnPhone ); > table.add( groupPersonalData ); > > /Rendering :/ > > The html would be rendered as a normal table, with a first line (above column > names), a special > header with the name of groupPersonalData with a span of 2 (as it has 2 > columns). > > I got a few other ideas for fancier layouts but that would be nice already. > > To hide and show the column, I would love to have a > groupPersonalData.setVisible( <boolean> ); > but I feel like click doesn't want to go that way and would prefer let people > use a css style or css > class to achieve that. > > > /Implementation :/ > > Well, on that side, just a few words, I am sure most people here will get > better ideas than mine. > Table class : > - add a property List<ColumnGroup> > - a few methods to add/remove them > - modify getColumnCount and other related methods > - modify rendering/template add a tr row containing ths for groups with a > span attribute, ungoruped > columns would have an empty th of span 1 or a group one or none if they are > no columngroups in the > table. > > /FormTable/ : > > The same would also be applicable to FormTable class, and FieldSets there > could have the same role > as column groups for editable fields. > > Thanks in advance for your time and feedback, > Stéphane > >
