Author Topic: Cell Not getting Focused When use summaryData option  (Read 537 times)

npdev13

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
Cell Not getting Focused When use summaryData option
« on: April 19, 2022, 06:46:41 pm »
Hello,
I am using the latest pqgrid version. but I am facing some issue, even this is on latest demo also. Below is the jsfiddle and description of issue.
https://jsfiddle.net/t5p82mh4/

Issue : 
When we Click on any cell to edit for example "Company", Change the company name and click on the Revenue cell (or any other cell). then that cell does not come focused to enter value, I need to click again to make it in edit mode. 
If I do not change the value in any of the cells and just click different cells it gets focused properly. but as soon as cell values change and click on different cells then it does not come focused.

I have done lots of tests and found that if we use the "summaryData" option then this issue happens.

Can you please give me some solution on this. I need it to be focused on every single click even if I use the "summaryData" option.

Thanks.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6296
    • View Profile
Re: Cell Not getting Focused When use summaryData option
« Reply #1 on: April 20, 2022, 10:52:51 am »
There are some modules like summaryData, excel formulas, js formulas which cause extra refresh of the grid when any cell value changes which cause this issue with single click to edit. I'm afraid there is no solution to it currently. I would look into it to have some solution in upcoming versions.

For now, you can use double click to edit which works fine.

Code: [Select]
editModel: {
     clicksToEdit: 2,

https://jsfiddle.net/pkxaoc86/

npdev13

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Cell Not getting Focused When use summaryData option
« Reply #2 on: April 20, 2022, 04:43:39 pm »
Hello,

If there is not solution at moment. Is there anyway so I forcefully focus that cell or fire the cellClick event on that cell. so it get focused?

Thanks,

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6296
    • View Profile
Re: Cell Not getting Focused When use summaryData option
« Reply #3 on: April 20, 2022, 06:05:47 pm »
you may use this https://jsfiddle.net/4mdugz05/

Code: [Select]
cellMouseDown: function(evt, ui){
        var grid = this;
          setTimeout(function(){
        var obj = grid.getEditCell();
            if(!obj || !obj.$editor){
           
              if(grid.isEditable(ui))
              grid.editCell(ui);
            }
          },300)
        },

but being a workaround, it may not work perfectly.

npdev13

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Cell Not getting Focused When use summaryData option
« Reply #4 on: April 20, 2022, 06:58:12 pm »
Hello,

Thanks for the workaround. It may be work.