Author Topic: Selected row focus issue after closing the Jquery popup  (Read 363 times)

pranit@srcomsec

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 99
    • View Profile
Selected row focus issue after closing the Jquery popup
« on: January 17, 2023, 09:28:29 pm »
We are scrolling row data in the grid and opening the popup based on row selection.

After closing the popup, the focus is set to the 1st row of the grid. We need to keep the focus and selection of the row after closing the popup.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Selected row focus issue after closing the Jquery popup
« Reply #1 on: January 18, 2023, 11:59:33 am »
Save focus parameters when grid loses focus ( in blur event )

Code: [Select]
blur: function(evt, ui){
g_ui = ui; //global var
}

Refocus when popup is closed by calling focus method.

Code: [Select]
  grid.focus( g_ui );

pranit@srcomsec

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 99
    • View Profile
Re: Selected row focus issue after closing the Jquery popup
« Reply #2 on: January 18, 2023, 01:43:40 pm »
Thank you but the focus is set to the last row of the grid viewport.

We did this via scroll position and working fine. We store the scroll position in the global variable via the "scroll" method and assign X & Y coordinates on the close popup.
https://paramquery.com/pro/demos/scroll