tags:

views:

462

answers:

1

Hello there,

I am wondering if it is possible with JqGrid advanced search to display multiple text boxes for some of the fields I want to search on. For example, if I have a 'Phone Number' field, I want to be able to visualize 2 boxes, one for area code and the other for the rest of the phone number. Then after pressing 'Find' I want to able to get the two values and merge them or do something else.

Any help would be appreciated,

Thanks,

fromano2802

+1  A: 
Oleg
Thank you, it worked, but now I have another problem.If I want to use the jquery mask on anothr field, it doesn't let me.The mask works only for the first field I am defining, but it will not display in the following fields, I can't even type in anything. The focus is still 'trapped' in the first field.
oirfc
You are right! It seems that **jquery.searchFilter.js** hat a bug in case of `multipleSearch: true`. Having multiple edit fields makes no problems. Unfortunately because of lack of time in my main projects I can not now invest more time in much investigations. I'll come back to the problem in 2-3 weeks. I can only suggest you to try place this problem as a bug in jqGrid forum (http://www.trirand.com/blog/?page_id=393) or try with another plugin instead of "Masked Input" Plugin. Sorry, but I decide to write you this information, thereby you don't wait from me a quick solution in the next days.
Oleg
Hi Oleg, thank you anywya for your answer. I tried already other plugins, but none of them comes closer to 'Masked Input'. Masked Input allows you to display the mask, while the others apply the mask while you are writing.If you have any other suggestion please let me know.
oirfc
Try to place this problem as a bug in jqGrid forum (trirand.com/blog/?page_id=393). Tony (the developer of jqGrid) works carefully on bug fixing. Just show, that one can use "Masked Input" Plugin inside of "inline edit" and "form edit" of jqGrid without any problem. So we have a **bug inside of ** *jquery.searchFilter.js* and only in case of multi-search ("Advanced Searching"). Post also a small code and exact description how to reproduce the problem. I think Tony will quickly find the bug and fix it in jqGrid the SearchFilter Plugin.
Oleg
I just created a new post in the JqGrid bug section of their forum.Hopefully, they can fix it quickly.Thank you for your help
oirfc
Hey Oleg,After reading your conversation with Tony of the JqGrid team in the JqGrid forum, I realize I have to give up using the masked input/multi-search combination. Is there any other way to add a mask to a field when using Advanced Search? i haven't found any plugin that come even close to the features of Masked Input.
oirfc
Hello! You should describe more exactly for which situation (which data input) you need the "Masked Input". This plug-in looks like very nice, but in the real usage you will find a lot of restrictions. For example, If you define a telephone number mask as (999) 999-9999 and try to enter a short number like (999) 123-456 it will be not allowed (try in the demo). So some other Plug-Ins which look like not so nice but has more freedom in defining of rules for input can be more useful in the practice. Just search more for validation of inputs as for a real musked input - it's my recommendation.
Oleg
I need a masked input, just like the plugin does.. When the masked field get the focus, I'd like to see the mask displayed and then when I click search, I'd like to be able to use that mask to split the string.As far as I know, only Masked Input has this two features.
oirfc
look at this http://stackoverflow.com/questions/3054811/add-multiple-input-elements-in-a-custom-edit-type-field/3055626#3055626. It can solve your problem.
Oleg