i'm using smartgwt listgrid datasource , filtering triggering server request, grid trying filter data locally , no data displayed. unfortunately i'm unable tell causes local filtering.
i started debugging smartclient javascript code , found out method isc_resultset__willfetchdata module isc_databinding returning false if filtering criteria changed. want method return true when filtering criteria changed. hard debug smartclient because obfuscated :(
how can force listgrid send request server when filtering criteria changed?
list grid confuguration:
grid.setshowrecordcomponents(true); grid.setshowrecordcomponentsbycell(true); grid.setwidth100(); grid.setheight100(); grid.setshowallrecords(false); grid.setcellheight(22); grid.setautofetchdata(false); grid.setcanedit(true); grid.setautosaveedits(false); grid.setshowfiltereditor(true); button filterbuttonproperties = new button(); filterbuttonproperties.setvisible(false); grid.setfilterbuttonproperties(filterbuttonproperties); grid.setallowfilterexpressions(true); grid.setfiltereditorheight(22); grid.setdatapagesize(30); grid.setrowendeditaction(rowendeditaction.done); grid.setlistendeditaction(rowendeditaction.next); grid.setconfirmdiscardedits(false); grid.setuseadvancedfieldpicker(true); grid.setadvancedfieldpickerthreshold(0); grid.setfieldpickerfieldproperties(new string[] { "frozen", "decimalprecision" }); grid.setautofitfieldsfillviewport(true); grid.setcanhover(true); grid.setshowhover(true); grid.setshowclippedvaluesonhover(true); grid.setdateformatter(datedisplayformat.toeuropeanshortdate); grid.setdateinputformat("dmy"); resultset resultsetproperties = new resultset(); resultsetproperties.setneverdropupdatedrows(true); grid.setdataproperties(resultsetproperties); grid.setselectiontype(selectionstyle.simple); grid.set gridcomponents(new object[] { list gridcomponent.filter_editor, list gridcomponent.header, list gridcomponent.body });
found it! abe figure out going on under hood replacing obfuscated code version debuging avaliable in location: smartgwt\com\smartclient\debug\public\sc\ must useful. had disable client-side filtering because differs server-side filtering. how can done:
resultset resultsetproperties = new resultset(); resultsetproperties.setuseclientfiltering(false); grid.setdataproperties(resultsetproperties); one day of work , 3 lines of code :) hope save time :)
Comments
Post a Comment