3.2.0

Fixed Columns?

Is it possible to create fixed columns? I would like to be able to make the two left most columns of my table fixed when doing horizontal scrolling.

Thanks so much for your great tool.
polytriks
January 6,
I am going to add this functionality in the future. With the current version it is quite complicated.
Alex (ActiveWidgets)
January 6,
Thanks for the quick reply.

If it is not too much trouble, could you give me a few hints on how this might be accomplished. I can probably figure it out, I'm just not sure where to start.

Thanks again.
polytriks
January 7,
You can try this:

obj.setTemplate("left/item", new Active.Templates.Text);
obj.setProperty("row/text", function(i){return myData[i][0]});

it should replace the row headers with a text column.

The left fixed part is a list (see source/lib/controls/grid.js), so we use text template instead of header as a list item.

The next step would be using Active.Templates.Row as a list item for the left part (same way as for the main part). However there are lots of complication in how you supply data models, do selections etc. I think I would rather postpone this.
Alex (ActiveWidgets)
January 7,
Alex, I have an implementation question and a bug report.

1) I'd like to extend the function when a column header is clicked. I'm not sure how to get to it.

var obj = new Active.Controls.Grid;
var column = new Active.Templates.Header;
column.setEvent("onclick",function(){this.action("HeaderClick")});
obj.setTemplate("column", column);

obj.setAction("HeaderClick",{alert(this.getSortProperty("index"))});


2). I found that setSortIndex(), setSortDirection(), and setColumnIndex() do not work, however their get counterparts do.
JJ
January 29,
JJ,

I asked about that a few posts ago.. see his example

http://www.activewidgets.com/messages/417-2.htm


Paul
January 30,
This is a great little tool. Is there any way to make the cell contents into links? For example, "Microsoft Corporation" would be a link to their website.

Thanks!
Lori
April 12,
I added a new link template into 0.3.0

var obj = new Active.Controls.Grid;
...
obj.setDataText(function(i, j){return myData[i][j]});
obj.setDataLink(function(i, j){return "http://www.microsoft.com"});
...

var link = new Active.Templates.Link;
link.setAttribute("target", "_new");
obj.setColumnTemplate(link, 1);
...

document.write(obj);
Alex (ActiveWidgets)
April 14,

This topic is archived.

See also:


Back to support forum