Hi Everyone,
Some time ago I had a question – is it possible to automatically maximize (expand) selector window when we opens it.
Out of my research I know now that there is no settings for that in the selector configurations but this is very possible with Javascript. And following another example of Javascript in Acumatica I want to share this example with you.
First thing we need to do is to add a Javascript control to Acumatica grid where you are planning to expand selector.
Than we just add the Javascript method that finds the selector panel from passed parameters and calls it’s method to expand
function myValueChanged(sel, ev) { var panel = sel.panel; panel.maximize(); }
Now we need to register this events using Selector Client Events. Please note that if you use grid, you need to use PXSelector control from RowTempalte for this property.
Now you can publish the customization and test your selector. You may note that sometimes extra scroll bars appears with that selector, but if you know JavaScript you can control this behavior easily.
Hope it helps!
Hi Sergey
I see this only changes the length and doesn’t do the same as the maximize button to fill the screen.
Is there a way to maximize the search box the same way as the maximize button in the top right?
Jaco, that is weird. When I tested it some time ago, it was working as maximize button.
Sorry, don’t have a fast answer for you. I will try to check later, or you may create a development support request.
Hey Sergey
found the issue you :
function myValueChanged(sel, ev)
{
var panel = sel.panel;
panel.maximize();
}
Jaco, thanks for showing this issue. I have fixed the code.