GridWeb when click and edit the cell

https://forum.aspose.com/t/16411

Since the forum is not able to reply,
the cell is still couldn’t edit the whole value at the first time I click on the cell. (Like the control as in MSexcel)
I only be able to start to add character at the end inside the cell.

FYI
If I am not explaining very cleanly, you can use the acwmain.js which from aspose-gridweb-8.6.3 ver(download with offical demo) instead the newest one.
Hope that information is helpful.

Hi,

Please try our latest version/fix: Aspose.Cells.GridWeb (JAVA) v17.6 with its resource files. We add a js option: focusinside (you may check it in acwmain.js file). This option denotes whether focus should be inside the cell span or not, the default value is set as “true”:
i.e.,
var focusinside=true;

For your requirements, you can set it to false.

Thank you.

I tried. However,
i.e cell value = ‘123’

  1. click once on a cell.(fine, it seems can select the whole cell in this version…at least looks like what I want…but)
  2. then I press ‘abc’ (cell value become ‘123abc’ instead of ‘abc’. It seems not the MSExcel style…)

Thank you so much for your help.

Hi,

Well, you got to click the cell two times where you need to overwrite the existing value in the cell. I am using Google chrome to test it.

Thank you.

You are right, I need to click two times to edit the cell…
But normally in Excel experience.
For a cell with value ‘123’

  1. user click ‘once’ on that cell
  2. enter ‘abc’
  3. cell value should become ‘abc’

However, the cell will become ‘123abc’ in the gridweb 17.6 version…
Is there any way to modify the js to get the output like ‘step 3’ because I can do so on gridweb 8.6.3.

Thank you very much.

Hi,

Please try the attached “acwmain.js” file in the attached archive below, it would work fine as you expected. Please replace this file with your existing file in the resource folder in your project. Also, kindly set the focusinside option to false:
e.g
var focusinside=false;

Let us know if you still have this issue.
acwmain.zip (57.6 KB)

Thank you.

Thank you very much but I couldn’t download it.
I click the link and redirect to a page with message:
“Sorry, this file is private. Only visible to post creator and staff members.”

@Gino1010,

We are sorry for your inconvenience.

The concerned team will be working over the issue and will fix it soon. In the meantime, please download it here:

Thank you.

Hi, I downloaded the js from your email and it works perfectly as what I wanted on IE browser .
However, it’s not works on firefox and chrome .

It will lost the ‘edit whole cell’ function after one click but it still can edit after double click.

Thank you very much.

@Gino1010,

I have tested your scenario/case using our latest version and latest acwmain.js file in Google chrome, it works fine and as expected. It correctly overwrites the existing value in the cells once you click on the cell (it does not append to the existing text or so). Could you check the version of acw resource file, your Google chrome browser is using, you may open the .jsp page into Google chrome and then click F12 and click on the console tab to write the following:
console.log(acw_version)
it prints me as following on my end:
v2017.06.22`

Also, make sure to first set the focusinside variable to “false” in the acwmain.js file and resave the file:
var focusinside=false;

Thank you.