3.2.0

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.
Thanks
Carlos
February 13,
Carlos,

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"]);
    obj.setColumnCount(3);
}

// create an object (instance of MyGrid class)
var obj = new MyGrid;
obj.setCellText("text");
obj.setRowCount(10);
document.write(obj);


Alex (ActiveWidgets)
February 13,

This topic is archived.

See also:


Back to support forum