Edit cell directly without Pop-Up

Answered
Akshay Alva asked on August 10, 2021

Hi, 
I would like to know if it's possible to edit the value of a cell directly on double-click and save the value instead of having a pop-up appear on double click and then edit, save the value.
 
Warm Regards,
Akshay

9 answers

Public
Vera Didenko Vera Didenko Flexmonster August 10, 2021

Hello, Akshay,
 
Thank you for your question.
 
Flexmonster is designed for analyzing and visualizing existing data; hence, it doesn't focus on editing the underlying data set.
Nevertheless, aside from editing cells in the drill-through view, you can also edit cells directly on the grid in the flat layout (see example).
 
We hope this helps.
You are welcome to reach out to us if other questions arise.
 
Kind regards,
Vera

Public
Akshay Alva August 13, 2021

Hi Vera,
Thanks for your response. The flat layout actually does not work in our client's use case. I did read in one of the older threads that it's possible to override the drill-through view and implement a workaround solution to edit and save directly.
Please check this link and solution below in one the responses...
https://www.flexmonster.com/question/edit-cell-in-pivot-table/
But you can consider the following workaround:

  1. Listen for the cell click or double click on the grid (http://www.flexmonster.com/api/cellclick/)
  2. Render custom text input over the grid
  3. Handle change of the custom input and update data via API (http://www.flexmonster.com/api/updatedata/)

Please let me know if this can work because its critical for our customer use to be able to edit and save the cell value directly without drill-through.
 
Warm Regards,
Akshay
 
 
 

Public
Vera Didenko Vera Didenko Flexmonster August 16, 2021

Hello, Akshay,
 
Thank you for your reply.
 
Yes, the suggested workaround in the provided Support Forum thread could work.
The idea lies in tracking the clicked grid cell, providing your own text input to enter the new value, applying the changes to your data set, and refreshing the data in Flexmonster with the updateData() API call.
You can implement additional functionality outside of Flexmonster and use Flexmonster API to reflect the changes.
Also, you are welcome to check out a similar case with a JSFiddle example provided in the following Support Forum thread.
 
We hope this helps.
As always, feel free to reach out if you have questions.
 
Kind regards,
Vera

Public
Akshay Alva August 24, 2021

Hi Vera,
Thanks for this! We were able to implement the direct cell edit functionality and get it working. 
An additional question..
As we edit and save the values in the cell directly and move to the next cell, is it possible to update the totals automatically as well?
 
Warm Regards,
Akshay

Public
Akshay Alva August 24, 2021

To be more clear on the second part.. is it possible to 'refresh' the updated totals as soon as we move out of a cell after edit/update?

Public
Vera Didenko Vera Didenko Flexmonster August 26, 2021

Hello, Akshay,
 
Thank you for the update.
We are happy to hear that it worked.
 
When a cell value is edited, it is possible to update the totals the following way:

  1. First, apply the change to your dataset on your server.
  2. Next, load the new dataset in Flexmonster.

Once you provide the updated data set to Flexmonster, Flexmonster will recalculate the totals automatically. To reload the data in Flexmonster, you can use the updateData() API call
 
We hope this helps.
 
Kind regards,
Vera

Public
Akshay Alva September 1, 2021

Thanks Vera, we were able to get the edit and totals update working correctly.
We however notice an issue that when we enter a value into the cell and click out into another cell, sometimes a row of cells get auto-selected. It happens intermittently and affects the user experience. Please see a short recording for your reference here and also the attached screenshot..
https://www.loom.com/share/8cabdfe9cb8448879ba82d3d0954da9f
Is there a way we can disable the multiple cell selection for our custom edit cells ?
 
Warm Regards,
Akshay

Attachments:
Snip20210902_1.png

Public
Vera Didenko Vera Didenko Flexmonster September 2, 2021

Hello, Akshay,
 
Thank you for your reply.
 
You can hide the cell selection via custom CSS combined with the showAutoCalculationBar: false property of the Options object.
Here is a JSFiddle for illustration: https://jsfiddle.net/flexmonster/9grcxL3w/.
 
Please let us know if this helps.
 
Kind regards,
Vera

Public
Akshay Alva September 2, 2021

Thanks Vera! Will try this and let you know.
 
Warm Regards,
Akshay

Please login or Register to Submit Answer