FlexGrid Full Text Search Question

Posted by: hbethel on 20 July 2020, 2:15 am EST

    • Post Options:
    • Link

    Posted 20 July 2020, 2:15 am EST

    Hi All,

    I have implemented the new full text search control, on a flexgrid and it’s working great. One thing I noticed in testing, the search control won’t clear the search completely.

    Type one or more characters in the search control, the grid filters the data as expected. Delete a character and the grid continues to behave normally. However, if all characters are deleted or you click the X button at the right, the grid continues to display the previous filtered view.

    Any assistance would be greatly appreciated!

    Thanks!

    Herbert Bethel

  • Posted 20 July 2020, 9:10 pm EST

    Hi,

    We are sorry, we are unable to replicate the issue at our end. Please refer to the following code snippet for reference:

    https://demos.componentone.com/ASPNET/MVCExplorer/FlexGrid/Searching

    Regards,

    Manish Gupta

  • Posted 21 July 2020, 1:31 am EST

    Hi Manish!

    Thank you for your quick response. I should have mentioned I was working with the MVC Core edition. Do you have an example using that version?

    Thanks!

    Herbert

  • Posted 21 July 2020, 9:03 pm EST

    Hello Herbert,

    Here is the demo sample for MVC Core edition:

    https://demos.componentone.com/ASPNET/5/MVCExplorer/FlexGrid/Searching

    Regards,

    Manish Gupta

  • Posted 22 July 2020, 1:30 am EST

    Thank you Manish!

  • Posted 24 July 2020, 3:10 am EST

    Hi Manish,

    I’m still having the same issue as before. I followed the .net Core example you provide and made a few changes. As before, everything works as expected, until I clear the search textbox. The grid continues to show the last search results.

    One thing I didn’t mention before, is my project is .net core razor pages, not MVC. Would I need to adjust code for that?

    Thanks!

    Herbert

  • Posted 26 July 2020, 3:57 pm EST

    Hello Herbert,

    We are sorry for the inconvenience, we are able to replicate the issue with the Razor pages. It is confirmed as a bug and it has been forwarded to the concerned team for further investigation with the internal tracking id 454908.

    We will let you know as we get an update on this.

    In the meantime, please use the following JS code as a workaround:

    <script>
        c1.documentReady(function () {
            var search = wijmo.Control.getControl("#search");
            search.hostElement.addEventListener("input", function (e) {
                if (search.text == "") {
                    setTimeout(function () {
                        search._rxSearch = null;
                        search._rxHighlight = null;
                        search._view.refresh();
                    }, search.delay);
                }
            }, true);
            search.hostElement.addEventListener("mousedown", function (e) {
                if (e.target.tagName == "BUTTON") {
                    setTimeout(function () {
                        search._rxSearch = null;
                        search._rxHighlight = null;
                        search._view.refresh();
                    }, search.delay);
                }
            },true);
        })
    </script>
    

    Hope it helps!

    Regards,

    Manish Gupta

  • Posted 27 July 2020, 1:15 am EST

    Hi Manish,

    Yes this helps tremendously! Thank you for the work around and hope to hear from you soon on the permanent fix.

    Regards,

    Herbert

  • Posted 18 February 2021, 1:31 am EST

    I recently upgraded ASP.NET MVC Core Edition to version 2020v3(297), and was able to remove the work around code provided in this conversation. The control is now working as expected.

    Thanks to the C1 development and support teams! Keep up the great work!

  • Posted 18 February 2021, 2:04 pm EST

    Hi Herbert,

    Thank you for letting us know that your issue has been resolved with the latest build. We hope you are enjoying our ComponentOne controls and glad to help you.

    Regards,

    Manish Gupta

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels