Author Topic: Event for Grid focus  (Read 426 times)

mraj

  • Newbie
  • *
  • Posts: 49
    • View Profile
Event for Grid focus
« on: May 06, 2024, 10:30:04 am »
Hi,
Is there any event for when the paramquery grid got focused?. Searched existing events, could not find.

Also when tried for javascript event, it is not firing.

    $("#grid").on('focus', function () {
        console.log('Inside  Focus');
    });

Any suggestion would help.

Thanks

mraj

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Event for Grid focus
« Reply #1 on: May 09, 2024, 03:38:34 pm »
There present one javascript event focusin
$("#grid").focusin(function () {
       console.log('Inside MLP Focus');
       
    });

but , this gets called for each and every record, some times within the record itself.

Any other event could you suggest.

mraj

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Event for Grid focus
« Reply #2 on: May 12, 2024, 09:44:23 am »
Hi,

Suggest any event for,

when  the grid got focused, all the drop down options present in it should be refreshed for new values. ( Refreshing drop down Only once will be a viable solution).

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Event for Grid focus
« Reply #3 on: May 13, 2024, 12:05:32 pm »
For one time event listeners, you can use one() instead of on() i.e., $grid.one( eventName, fn ) instead of $grid.on( eventName, fn )

Selection events may be helpful to you:

https://paramquery.com/api#event-selectChange

https://paramquery.com/api#event-selectEnd

mraj

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Event for Grid focus
« Reply #4 on: May 24, 2024, 10:12:02 am »
thanks for your reply. Yet to try this.