This is a migrated thread and some comments may be shown as answers.

[Solved] Extracting data client-side from hierarchical grid

1 Answer 99 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 02 Jun 2009, 04:15 PM
I have a hierarchical grid, from which I need to extract data on the client side.

I have a handler function wired up for OnRowSelected(sender, eventArgs).

I can retrieve the data in the row using eventArgs.getDataItem().get_cell('columnname').  My problem is that if the row selected is in a detail table, some of the data I need is in the parent row.  (The detail tables show weak entities).

I can see three possibilites:

1. I somehow manage to obtain access to the parent row's gridDataItem.  I haven't been able to figure out how to do that.
2. I duplicate the fields I'm interested in in the rows of the detail table, and make them Display=false.  When I do this, get_cell().innerHTML contains &nbsp.
3. I duplicate the fields I'm interested in in the rows of the detail table, and make them Display=true.  This works, but it results in an unacceptable appearance in the user interface.

Any ideas on how to either access the parent row's data, or to access the data for hidden fields in the current row?

1 Answer, 1 is accepted

Sort by
0
Jeff
Top achievements
Rank 1
answered on 02 Jun 2009, 04:24 PM
OK, never mind.

I tried adding the fields to the detail table with Display=true, and they were empty.  I'd not been populating them in the DataStore.  With that fixed, the values show up correctly.
Tags
Grid
Asked by
Jeff
Top achievements
Rank 1
Answers by
Jeff
Top achievements
Rank 1
Share this question
or