Author Topic: Cell with multi-line content using textarea not going into edit mode  (Read 4895 times)

Stephanie Laurent

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 9
    • View Profile
Hi

We have an issue where we have set up the grid so that each cell is of content type string and make use of the editmodel with a textarea control. We fetch the JSON data using ajax and only then do a instantiate the grid and manipulate and populate the grid data.

The issue is that when I edit the cell changing the content to contain multiple lines of text and save that cell and edit a next cell. When I go back to that cell I cannot enter the edit mode, it shows the textarea briefly and then takes the cell out of edit mode again thus I am not able to edit that cell again. This only happens on the first cell you edit in a row and add multi-line content, all other cells in that row is still editable until you add multiple lines of text, then that cell cannot be edited again as well.

Please find attach files of the code I use to create the grid, snapshot of the data and also a screen shot of the grid

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
I can't execute your code as it's incomplete, but upon code review this line could be the cause of issue.

$cgrid.pqGrid("option", "scrollModel", { autoFit: true, flexContent: true }); // this undefines the other properties of scrollModel.

Either specify scrollModel during initialization or specify autoFit like this.

$cgrid.pqGrid("option", "scrollModel.autoFit", true );

If you are still facing issues, please share a jsfiddle ( preferable way to troubleshoot issues )

http://jsfiddle.net/kw77c0sg/
« Last Edit: July 15, 2015, 05:23:15 pm by paramquery »

Stephanie Laurent

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 9
    • View Profile
Thanks I will try and get a sample together if it still persist.

Stephanie Laurent

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 9
    • View Profile
Hi

I've narrowed the issue down to IE8/9 and 10 using paramquerygrid v3.0.0. I tried to put a jsfiddle together but it doesn't run in IE8 so please find attached zip with a sample that you can run in IE8/9 and 10. It works in Firefox and Chrome

Here is the jsFiddle sample (https://jsfiddle.net/jeanproux/yrdxLf1q/4/). You will see that it works fine in IE11.

the issue is if you edit a cell in the "Shipping address" column, adding multiple lines of text, move off it and then try to edit that cell again the cell doesn't go into edit mode again. The editor briefly appears and then cell removes it again. It also seems that the specific html structure plays a role. If you remove the "outerDiv" div then it runs in IE8 but when the grid div is surrounded by another div the editor fails to open. Another way I got it to work in IE8 is to set flexHeight to false, then the cell can be edited again? The problem with the flexheight=false is that the grid doesn't show nicely so we would like it to be true.

Please can you have a look at the sample. Could it be the version of the grid or jquery that is causing it. I used no other stylesheets or js files that could influence the display as you can see in the sample. The only style I use is the one you use on your demo.

Thanks

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Thanks for sharing sample and jsfiddle. I was able to reproduce the issue in IE8, though IE9/10 work fine. Also this issue is in version 3 and version 2 works fine.

Fix to this issue would be included in next release ( first week of August ).

Stephanie Laurent

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 9
    • View Profile
Thank you

Would it be okay to downgrade to the latest version 2 release?