Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Datasource

    Hi,

    I am newbie. When I am using Listgrid and Datasource (mapped to a table).

    I use :
    Code:
     setDataURL("xxxx/enrolments");
    to fetch ALL rows from the table.

    After a certain event, I want to display certain rows from the table (let's say rows whose type="square").

    I use ListGrid.fetchData and criteria to achieve all this and it's not a problem so far by following the sample examples.

    However, I found that if the ListGrid is drawn, the criteria is somehow forgotten. The ListGrid is re-drawn if I click on an entry in the ListGrid or if the ListGrid isn't displayed onscreen yet when when I set the criteria.

    How do I make the ListGrid remember the criteria that was set?

    Thanks.

    #2
    Hi,

    try to use the following snippet of code
    Code:
    dataSource.fetchData(null, new DSCallback () {
    	@Override
    	public void execute(DSResponse response, Object rawData,
    			DSRequest request) {
    		table.setData(response.getData());
    	}
    });
    Take also a look to the Javadoc about the DataSource.fetchData() methods...there you could find some useful information.

    I hope this can help you.

    Regards,

    Salvatore

    Comment

    Working...
    X