Expand my Community achievements bar.

Accessing AdvancedDataGrid row/column directly

Avatar

Level 1

I run into this problem repeatedly, and every time I have to find a wonky workaround.

In essence, I need get direct access to a cell in an ADG - properties, data, row index, etc.

Specifically, this is an accounting application:

I have an ADG with some deeply nested heirarchical data. Each level gives the user more detail. So, for each "row" in the dataProvider, the ADG has at least three summary rows corresponding to SuperCategory, Category, and SubCategory.

When a user double-clicks on a number, it's supposed to pop up with the specific budget line items that make up that total. Problem is, when I create a cursor to traverse the ADG, the rowIndex returned by the ListEvent takes summary rows into account, but the dataProvider doesn't. Therefore, I don't get the data the user clicked on, and if they click way down the list it runs off the end and returns an error.

Example:

dataProvider:

Row1: SuperCategory Category SubCategory Account1 $Amount1

Row2:  SuperCategory Category SubCategory Account2 $Amount2

etc...

ADG:

SuperCategory

     Category

          SubCategory

               Account1 | $Amount1 <- USER CLICKS HERE

The ADG ListEvent.rowIndex = 3, but the row in the dataProvder = 0. Just subtracting four only works for the first group, b/c apparently the row numbers are cumulative, not heirarchical.

Using the ADG's indicesToIndex method doesn't work, either, apparently for the same reason. It counts summary rows and runs off the end if you click too far down in the grid.

So... how do I get the ADG to return Account1 when user clicks on $Amount1?

Thanks.

3 Replies

Avatar

Level 3

Try reposting on the Flex forum. This forum is for the LiveCycle Data Services product.

Avatar

Level 1

I was under the impression that Flex used LiveCycle as its back end. I've been told to post these kind of questions here by Flex people.

Avatar

Level 3

Flex can use LiveCycle Data Services on the backend, but it can work with data from many other types of backends as well. The AdvancedDataGrid is a Flex SDK client-side component that consumes data, but it is not tied in any way to specifically to the LiveCycle Data Services server.

This search URL will give you a links to many Flex forums postings about the AdvancedDataGrid:

http://forums.adobe.com/search.jspa?resultTypes=DOCUMENT&resultTypes=MESSAGE&resultTypes=COMMUNITY&r...

..