Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Nested grid disappears when collapsing list grid record

$
0
0
SmartGWT 3.0
v8.2p_2012-10-11/PowerEdition Deployment
IE 8
Google Chrome 27.0.1453.94

Hi Isomorphic,

I am facing an issue around Nested Grids.

If I expand more than one record to display nested grids (expanded.JPG) and then try to collapse a single record all nested list grids disappear (collapsed.JPG).

I am able to reproduce this in your showcase example http://www.smartclient.com/smartgwt/...ed_nested_grid if I remove the primary key from the datasource field in SupplyCategoryXmlDS.java:
Code:

DataSourceTextField itemNameField = new DataSourceTextField("categoryName", "Item", 128, true); 
//itemNameField.setPrimaryKey(true);

When I set itemNameField as a primary key the collapse functionality works as I expect.

However when I fetch the data and use a DSCallback() which I use to set data to the listGrid from the response:
Code:

listGrid.fetchData(null, new DSCallback() {
                               
                                @Override
                                public void execute(DSResponse response, Object rawData, DSRequest request)
                                {
                                listGrid.setData(response.getData());
                                }
                        });

the same collapsing issue occurs.

- Is a primary key needed for collapsing a nested listGrid?
- Would using a DSCallback and setting the List Grid data from the response cause the the DataSourceTextField to lose is primary key?

Any help would be appreciated?

Thanks
Todd

Attached Images
File Type: jpg expanded.JPG (55.0 KB)
File Type: jpg collapsed.JPG (31.6 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles