3.2.0

wrong span id in row template for extended grid?

When trying to implement the expanding row example in version 2.0b4, it wasn't working when I was using AW.Grid.Extended instead of AW.UI.Grid.

var row = gridCdmItems.getRowTemplate(ixRow);
var rowId = row.getId();


For both AW.Grid.Extended and AW.UI.Grid, rowId = 'aw50-row-0'. But using the extended grid, that ID doesn't exist in the document. 'aw-50-row-0' does exist as the ID for the row. I can see it using a DOM tree viewer.

The documentation on the web site indicates the same getRowTemplate call for both grids to get a row template.

Am I missing something here?
Jim D.
February 2,
Oops, I have a typo here.

The rowId in the DOM for the extended grid is 'aw50-row-0-0'.
Jim D.
February 2,
Jim, yes this is correct - IDs are different because the Extended grid has three scrolling areas (left, center, right), so each row is split into three segments. In this case getRowTemplate(row) returns 'prototype' object and not actual row segments. If you make changes to it - the changes are applied to all three segments. You can refer to each segment with getRowTemplate(row, segment).
Alex (ActiveWidgets)
February 2,
Alex,

The problem is not that the IDs are different between the versions. The problem is that for the extended grid, I'm receiving the rowId as in the code above (aw50-row-0'), and it doesn't even exist in the DOM. I can search the DOM visually with a tool, call getElementById( 'aw50-row-0' ), or use another tool to search for the element by id, and all three results confirm that 'aw50-row-0' doesn't exist in the DOM.

If I hard-code the name 'aw50-row-0-0', that is successful because it exists in the DOM and is the ID of the element that contains all the parts of the row. I can then appendChild to that element to add other information to the row (expand the row as 1.0 previous examples).

So it looks like the above code is correct, but the rowId returned is 'aw50-row-0' when it should be 'aw50-row-0-0'.
Jim D.
February 2,
'aw50-row-0-0' is an ID of one row segment and not the whole row. The ID of the whole row is 'aw50-row-0' but the whole row is never written to the DOM (in Extended grid). So when you call obj.getRowTemplate(i) it returns the 'whole' row and its ID is 'aw50-row-0' but there is no element with id='aw50-row-0' in the DOM tree.
Alex (ActiveWidgets)
February 2,
Thanks for the reply, Alex.

I'm not seeing a way to expand a row and add more information with the extended grid the way we can with the normal grid because I guess there isn't an element enclosing the whole row. Just as you described, the additional information appears in one of the segments. The last message I wrote sounds like the additional info is contained within the whole row, but it isn't.

This is a key thing we need to do to use the grid (extended mode) and purchase an enterprise license. Please let me know if I can try something else, or if it would be possible to write the whole row to the DOM. :) I'm guessing you have the current structure for freezing columns.

You mentioned in an email something about grouping rows in version 2.1, so I'm hoping there is something that can be done here.
Jim D.
February 2,

This topic is archived.

See also:


Back to support forum