I have a ListGrid showing a FilterEditor. The first field on the grid, BUSINESS_CODE, has an optionDataSource defined in the ds.xml file so the FilterEditor correctly shows what appears to be a SelectItem containing a blank followed by the 4 business codes in my test database A, B, C and D.
The question is how do I code so that by default the first business code is selected and the grid is filtered by business code before showing the grid to the user? So with my test data the grid would only display rows with business code A. (The user can then select another business code, or none, if desired).
I know that setDefaultToFirstOption on a SelectItem will pick the first option but how do I get a reference to the SelectItem in the FiltorEditor?
I've also thought about setting the grid criteria, but is there a way to use the data that the optionDataSource retrieves, instead of having to issue a DSRequest to retrieve the same information?
Any hints on how to achieve this will be appreciated. Thanks.
SmartClient Version: SC_SNAPSHOT-2012-03-01_v8.2p/Pro Deployment (built 2012-03-01)
The question is how do I code so that by default the first business code is selected and the grid is filtered by business code before showing the grid to the user? So with my test data the grid would only display rows with business code A. (The user can then select another business code, or none, if desired).
I know that setDefaultToFirstOption on a SelectItem will pick the first option but how do I get a reference to the SelectItem in the FiltorEditor?
I've also thought about setting the grid criteria, but is there a way to use the data that the optionDataSource retrieves, instead of having to issue a DSRequest to retrieve the same information?
Any hints on how to achieve this will be appreciated. Thanks.
SmartClient Version: SC_SNAPSHOT-2012-03-01_v8.2p/Pro Deployment (built 2012-03-01)
Comment