EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Pierre on April 01, 2016, 11:51:40 PM



Title: Cell editing
Post by: Pierre on April 01, 2016, 11:51:40 PM
Hello All
I saw cell editing extension and it looks great, but have one question:
- how to set cell editing to work like in Excel? With other words, click to cell should only select cell (not start to edit it) but cell should be ready for writing.
It works perfect using keyboard (using arrow keys, cell can be selected and you can start to write - how to do same with mouse?
thank you.


Title: Re: Cell editing
Post by: jarry on April 02, 2016, 08:35:34 AM
Please set the 'clickToEdit' and 'dblclickToEdit' properties to get this feature.
Code:
$('#dg').datagrid({
  clickToEdit: false,
  dblclickToEdit: true
});


Title: Re: Cell editing
Post by: Pierre on April 02, 2016, 11:21:54 AM
Thank you for that but it does not helped.
What I try to achieve is to select cell with single mouse click but not to edit it in same time. Edit should start using keyboard typing or using double click and edit should stop when I click on other cell.
With other words - I need Excel functionality like it works here:
https://handsontable.com/examples.html?headers
Thank you.


Title: Re: Cell editing
Post by: jarry on April 02, 2016, 04:46:20 PM
Yes, set clickToEdit to false, you will be able to select a cell without editing it when clicking on a cell. Setting dblclickToEdit to true allows you to edit a cell by double clicking on it.

Make sure to download the extension from http://www.jeasyui.com/extension/datagrid_cellediting.php


Title: Re: Cell editing
Post by: Pierre on April 02, 2016, 10:45:13 PM
I re-downloaded and yes it works just perfect.
Thank you so much.


Title: Re: [Solved] Cell editing
Post by: Pierre on April 14, 2016, 04:02:42 AM
Jarry
any chance to add this great feature to treegrid, too?
Thank you.