Hello there,
I am using a licence copy of SmartGWT Power 3 and testing on Firefox browser version 26.
I am trying to load data from multiple tables(5 tables) into a Listgrid which has around 900 records. But when I try to scroll the records in the browser it is slow to render and show the data,which is annoying to the users.
Below is my client side code.
This is the datasource which I pass to my listgrid
Below is the SQL SmartWT generates for my datasource
I am using a licence copy of SmartGWT Power 3 and testing on Firefox browser version 26.
I am trying to load data from multiple tables(5 tables) into a Listgrid which has around 900 records. But when I try to scroll the records in the browser it is slow to render and show the data,which is annoying to the users.
Below is my client side code.
Code:
public class CusNeighbourGroupView extends VLayout implements CusNeighbourGroup { public CusNeighbourGroupView() { intialise(); } public void intialise() { ListGridField province = new ListGridField("provincename"); ListGridField capital = new ListGridField("capital"); ListGridField code = new ListGridField("code"); ListGridField telcode = new ListGridField("telcode"); ListGridField county = new ListGridField("countyname"); ListGridField district = new ListGridField("district"); ListGridField city = new ListGridField("city"); ListGridField zone = new ListGridField("zone"); ListGridField neigbhour = new ListGridField("neigbhour"); ListGridField taxcodecity = new ListGridField("taxcodecity"); ListGridField fdocode = new ListGridField("fdocode"); ListGridField countCustomer = new ListGridField("countCustomer"); final ListGrid listGrid = new ListGrid(); listGrid.setWidth100(); listGrid.setHeight100(); // listGrid.setShowAllRecords(true); listGrid.setDataSource(DataSource.get("neighbourDS_1")); listGrid.setAutoFetchData(true); // listGrid.setCanMultiSort(true); listGrid.setFields(province, capital, code, telcode, /*taxcode,*/ county, district, city, zone, neigbhour, taxcodecity, fdocode, countCustomer); setWidth100(); setHeight100(); addMember(listGrid); }
Code:
<DataSource ID="neighbourDS_1" serverType="sql" tableName="neighbourhood" inheritsFrom="neighbourDS"> <fields> <field name="provincename" includeFrom="provinceDS.provincename" /> <field name="capital" includeFrom="provinceDS.capital" /> <field name="code" includeFrom="provinceDS.code" /> <field name="telcode" includeFrom="provinceDS.telcode" /> <field name="countyname" includeFrom="countyDS.countyname" /> <field name="district" includeFrom="districtDS.districtname" /> <field name="city" includeFrom="cityDS.cityname" /> <field name="taxcodecity" includeFrom="cityDS.taxcodecity" /> <field name="fdocode" includeFrom="cityDS.fdocode" /> <field name="zone" includeFrom="zoneDS.zone" /> </fields> </DataSource>
Below is the SQL SmartWT generates for my datasource
Code:
SELECT * FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY id) AS rowID FROM ( SELECT TOP 100 PERCENT neighbourhood.id, neighbourhood.alternateName AS neigbhour, province.provincename, province.capital, province.code, province.telcode, county.countyname, district.districtname AS district, city.cityname AS city, city.taxcode AS taxcodecity, city.fdocode, zone.name AS zone FROM city, neighbourhood, province, county, district, zone WHERE ( '1'='1') AND neighbourhood.zoneId = zone.id AND zone.cityId = city.id AND city.districtID = district.id AND district.countyID = county.id AND county.provinceID = province.id) x) y WHERE y.rowID BETWEEN 1 AND 75
Comment