Alternative for AW.object(this.element().id)
Hello I am interested in using the same function handlers for all the grids.
so instead of using "myGrid" as the object I can use AW.object(this.element().id) as shown below
example:
instead of
I have no idea which are the system resources used by this method and my question is that is it suitable for using it.
If no, which are the alternatives ?
I also want to get the instance of the input text used by AW to edit the cell. For now I use:
as in
which reads though the entire grid / spans.
PS: For the demonstration I have used a 2-footered Extended Grid with editable rows / cells and when editing I display the current text value to the 2nd footer cell that coresponds to that column... as testing purposes
Thanks in advance
so instead of using "myGrid" as the object I can use AW.object(this.element().id) as shown below
var myGrid = new AW.Grid.Extended;
...
myGrid.onCellTextChanged = cellTextChanged;
myGrid.onCellEditStarted = cellEditStarted;
...
example:
function cellTextChanged(text, column, row)
{
AW.object(this.element().id).setFooterText(text, column, 1);
AW.object(this.element().id).getFooterTemplate(column, 1).refresh();
};
instead of
function cellTextChanged(text, column, row)
{
myGrid.setFooterText(text, column, 1);
myGrid.getFooterTemplate(column, 1).refresh();
};
I have no idea which are the system resources used by this method and my question is that is it suitable for using it.
If no, which are the alternatives ?
I also want to get the instance of the input text used by AW to edit the cell. For now I use:
this.element().getElementsByTagName('INPUT')[0];
as in
function cellEditStarted(text, column, row)
{
var cellEd = this.element().getElementsByTagName('INPUT')[0];
cellEd.setAttribute('maxLength',5);// limit to 5 chars
cellEd.name = cellEd.id;//for viewing in FF Page information-Forms
};
which reads though the entire grid / spans.
PS: For the demonstration I have used a 2-footered Extended Grid with editable rows / cells and when editing I display the current text value to the 2nd footer cell that coresponds to that column... as testing purposes
Thanks in advance
Bogdan P.
March 31,