i am using Listgrid of smartgwt api. i have set filter editor on the list grid using setShowFilterEditor(). On UI, i can filter out the list data from the particular columns using filter editor which is shown on top of listgrid. till this, everything works fine. but problem starts after this. my ListGridRecords are of type ScreenInstanceGridRecord.
I cleared out the filter criteria before getting the ListGridRecord from the ListGrid using method clearCriteria(), so that i can save all the records to database ie. unfiltered records. when i try to get records from the listgrid using getRecordList(), 1000 Dummy records are added on the fly on first iteration, all my populated records are ignored . and i need here is records of ScreenInstanceGridRecord type. but on second iteration, i am getting my populated records which is of ScreenInstanceGridRecord type. why this problem is occurring. i should be getting ScreenInstanceGridRecord on the first iteration itself when i try to get records from the ListGrid using getRecordList(). i am getting no idea about this weird thing. any help from your side is most welcome.. i am giving u piece of code which give u an idea where i am getting problem public void onModuleLoad() { DataSourceIntegerField idSource = new DataSourceIntegerField("id"); idSource.setPrimaryKey(true); idSource.setHidden(true); DataSourceTextField nameSource = new DataSourceTextField("name"); DataSource ds = new DataSource(); ds.setFields(idSource, nameSource); ds.setClientOnly(true); final ListGrid grid = new ListGrid(); grid.setDataSource(ds); grid.setShowFilterEditor(); // problem lies here grid.setWidth(600); grid.setHeight(400); grid.setAutoFetchData(true); grid.setAlternateRecordStyles(true); grid.setShowAllRecords(false); Button savebutton = new Button("Save"); saveButton.addClickHandler(){ grid.clearCriteria(); RecordList records = grid.getRecordList(); int length = recordList.getLength(); // On First Iteration, this method always giving me 1000 dummy records. its doesnt matter how many records are populated in the grid. but on second iteration, it is giving me right records length. } i don't know what the heck is happening here. i am very confused for past 3 days. please give me some light on it. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.