ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: mraj on July 23, 2024, 07:57:04 pm

Title: how to avoid bootstrap conflict, while using regular expressions,
Post by: mraj on July 23, 2024, 07:57:04 pm
Hi
I have given validation for a cell in the grid. when the tooltip pops

I am getting error like this, How to avoid bootstrap conflict,  Please explain step by step for resolving conflict.

Also cursor is able to move outside the cell after the validation. how to arrest if validation fails ?

TypeError: No method named "open"
    at HTMLDivElement.<anonymous> (tooltip.js:617:15)
    at Function.each (jquery.js:367:19)
    at jQuery.fn.init.each (jquery.js:202:17)
    at jQuery.fn.init.jQueryInterface [as tooltip] (tooltip.js:609:17)
    at h.isValidCell (pqgrid.min.js:10:27573)
    at h.isValid (pqgrid.min.js:10:28014)
    at d.isValid (pqgrid.min.js:10:27764)
    at d._digestData (pqgrid.min.js:11:15265)
    at a.updateRow (pqgrid.min.js:14:23726)
    at d.saveEditCell (pqgrid.min.js:11:13778)
Title: Re: how to avoid bootstrap conflict, while using regular expressions,
Post by: paramvir on July 24, 2024, 08:45:02 pm
Solution is mentioned here: https://paramquery.com/pro/tutorial#topic-bootstrap
Title: Re: how to avoid bootstrap conflict, while using regular expressions,
Post by: mraj on July 29, 2024, 10:27:41 am
Hi,

I added the following lines in $(function(){


            $.fn.bootstrapBtn = $.fn.button.noConflict();
            $.fn.bootstrapTooltip = $.fn.tooltip.noConflict();

..

at the beginning itself.

conflict got removed. no error is showing. and showing the pqgrid provided tooltip in red color, instead of showing in black color ( previously it was ).

How to arrest the movement of the cursor from the cell if the data provided  is invalid. ?

Title: Re: how to avoid bootstrap conflict, while using regular expressions,
Post by: mraj on July 29, 2024, 11:32:53 am
Regular expression as function it is working

{
                                        type: function (ui) {
                                           
                                            var val=ui.value;
                                            let pt = /^(\d+(,\d+)*)?$/;
                                            if (!(pt.test(val))) {
                                               // alert('Not a valid value ');
                                                ui.msg = "Not a Valid Value : " + val;
                                                return false;
                                            }

                                        }
                                    }

where as a regular expression syntax in pq grid it is not working.

{ type: 'regexp', value: '^(\d+(,\d+)*)?$', msg: 'Not in Proper format' }

Title: Re: how to avoid bootstrap conflict, while using regular expressions,
Post by: paramvir on July 29, 2024, 07:59:46 pm
One is created using literal notation and the other one with a constructor

you need to escape the regexp value string in the same way it's required while using new Regexp(string) by replacing "\" with "\\"
Title: Re: how to avoid bootstrap conflict, while using regular expressions,
Post by: mraj on August 01, 2024, 09:06:39 am
Thanks, it worked