EasyUI Forum
May 09, 2024, 02:29:26 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Cell editing  (Read 7277 times)
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« 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.
« Last Edit: April 14, 2016, 04:02:53 AM by Pierre » Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 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
});
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #2 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.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #3 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
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #4 on: April 02, 2016, 10:45:13 PM »

I re-downloaded and yes it works just perfect.
Thank you so much.
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #5 on: April 14, 2016, 04:02:42 AM »

Jarry
any chance to add this great feature to treegrid, too?
Thank you.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!