Hi all!
I'm using smartGwt [3.0].
In my application i use only one ListGrid to display statistics data.
It's stored in mongoDb, so i just forward JSON data to client side.
As you understand, statistics data may has different structure by types - so i do recursively parse recieved data, get the set of keys and build necessary ListGridFields for ListGrid:
It works perfectly, but now i'd like to perform filtering for records, but i cant dynamically change DataSource fields, right?
DataSource.setFields(...) JavaDoc:
Is It possible to perform filtering in ListGrid without attached DataSource?
I'm using smartGwt [3.0].
In my application i use only one ListGrid to display statistics data.
It's stored in mongoDb, so i just forward JSON data to client side.
As you understand, statistics data may has different structure by types - so i do recursively parse recieved data, get the set of keys and build necessary ListGridFields for ListGrid:
Code:
final ListGridField[] fields = new ListGridField[ fieldKeys.size() ]; for ( String key : fieldKeys ) { final ListGridField gridField = new ListGridField( key ); gridField.setCanFilter( true ); fields[ i ] = gridField; i++; } setFields( fields );
DataSource.setFields(...) JavaDoc:
Code:
@throws IllegalStateException this property cannot be changed after the underlying component has been created
Comment