07-31-2013 08:11 AM
Hi,
We have upgraded a customer form version 7.5.3 to version 8.0.
When we are on a list of Accounts, on the server himself the filters are working ( IE8), but on a client machine ( https:...) IE9 or firefox 10 no filters are working.
What can we do
Best regards
08-01-2013 08:30 AM
The lookup control is not going to expose anything on the server side to do what you want... you'll have to manhandle the DOM with client-side Javascript.
This code was written for 7.5.4 (Ext.js not Dojo), but it might be a step in a direction (hopefully the right one!). On page load the lookups are built in JS and named "[clientID]_luobj", this object contains all the lookup methods and properties. The "initGrid" function is fired when the client clicks the lookup control, which builds the lookup UI in the DOM. We extend this method on the lookup instance: first we call the prototype method, then add our extra junk (in this case, sort the grid). For dojo you'd want to use "mixin" instead of "apply", and "dojo.ready" instead of the jQuery "$(window).load(...)". I use Chrome developer tools to wade through the available members.
This is a C# snippet set up for onLoad. You'll need it to run on every repaint.
// create the javascript
string script = @"
$(window).load(function() { // this fires after lookups (luobj's) are built var obj = " + lookupName.ClientID + @"_luobj; obj.initGrid = function (seedValue, reload) { LookupControl.prototype.initGrid.apply(this, [seedValue, reload]); this.getGrid().getNativeGrid().getStore().setDefaultSort('Name'); } }); ";
// register the script for pageload ScriptManager.RegisterStartupScript(Page,Page.GetType(),"LookupSort",script,true);
Sorry this is not a complete solution.
08-14-2013 03:55 AM
08-26-2013 11:49 AM
Have you looked at Firebug to determine if you have any network errors?
(I responded to the wrong post above... in 8.0 in lookup properties there is now a "visible" option to let you display prefilters.)