Andrus
Andrus

Reputation: 27953

How to force fields in advanced search to have reasonable width

In advanced search dialog, all search field have width of maximum field.

If there is wide search field which does not fit to search form and right justified numberic amount searc field, amount contants are not visible.

To reproduce, create wide editable note column using colmodel:

name: "note", 
width: 43, 
editoptions: {"maxlength":80,"size":80 }

And select amount and notes field in search form in small screen

notv

Amount field width is too big. Accessing its value requires scrolling.

Amount field should have its native width . There is no need to create so wide Amount field.

How to fix this ?

I tried todays free jqgrid from github, but problem persists. Testcase is in https://jsfiddle.net/kobruleht/wpyb50fj/

Upvotes: 0

Views: 35

Answers (1)

Oleg
Oleg

Reputation: 221997

It seems to me that the most easy way to solve the problem would be to add

searchoptions: { maxlength: 80, size: 20 }

option. It allows to use long field for editing, but to hold the searching filed small. See the demo https://jsfiddle.net/wpyb50fj/1/.

The structure of searching dialog is the table. On can easy reduce the width of input of amount, but other elements of the searching dialog will still look not nice. Thus I don't see another solution of your problem, which will be easy enough.

Upvotes: 1

Related Questions