:: Forum >>

How to extend core functionallity....

Is there an easy way to extend some core functionallity without subclassing the grid ?? ;-)
( set something as default for every new grid defined )
I know it depends on what exactly need to be included, but as simple samples like:
- Define a custom control (or any UI one ) iside the corner (top-left) with a default object name etc..
- obj.setColumnIndices()/obj.setRowIndices() not empty by default ( if it have several implications with all Data-Models , then just for Array-Model)
- Always Perform an event after header-click (after sort) etc..

Sorry for too many questions in one.
Monday, February 13, 2006

I think you should subclass the grid and I don't see it as something too much complicated -

// create MyGrid class
var MyGrid = AW.UI.Grid.subclass();

// modify MyGrid prototype
MyGrid.create = function(){
    var obj = this.prototype;
    obj.setStyle("border", "2px solid red");
    obj.setHeaderText(["Col1", "Col2", "Col3"]);

// create an object (instance of MyGrid class)
var obj = new MyGrid;

Alex (ActiveWidgets)
Monday, February 13, 2006

This topic is archived.

Back to support forum

Forum search