Wj flex grid search conditions in custom template

Posted by: brijeshkumar.marand on 31 August 2023, 9:24 pm EST

    • Post Options:
    • Link

    Posted 31 August 2023, 9:24 pm EST

    Hi,

    I have a couple of questions for using wj-flex-grid-search.

    1. Use the custom template for search template. When doing this I want dynamic condition inside the template to swap the icon and sometimes for styles. I tried to replicate the suggestion on this thread (https://www.grapecity.com/forums/wijmo/flexgridsearch-custom-input-field) and created this sample for angular but it doesn’t seem to work for dynamic angular.

    Sample: https://jscodemine.grapecity.com/sample/RK1xVL56wUu5XIbrvYI4uw/

    1. Get search control text on change. Currently, there is no event available to catch the input change. The lostFocus and refreshing events are triggered on blur. The input change trigger will refresh the attached grid but we don’t have any way track the control text at that point. Is there a way to get the input value? If #1 can be dynamic template, then it would help in solving this problem as well, but just posting separately in case #1 is not that straightforward.

    Thanks in advance!

  • Posted 3 September 2023, 8:35 pm EST

    Hi Brijesh,

    Thank you for sharing the sample.

    1. To get the desired results, you can insert your custom icons initially in the control template and then change icons or styles dynamically by updating the CSS styles later.

    2. You can attach the ‘input’ event listener to the ‘inputElement’ of the FlexGrid Search by accessing the element through the ‘inputElement’ property of the FlexGridSearch control.

    You can refer to the following updated sample for a demonstration - https://jscodemine.grapecity.com/share/uYeXyYgSBkawXxNhxZ3rRg/

    In case you face any issues, please let us know.

    Regards,

    Vivek Pannu

Need extra support?

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

Learn More

Forum Channels