EasyUI Forum
June 21, 2024, 01:32:35 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Can't make cells editable in DataGrid  (Read 2657 times)
gib65
Newbie
*
Posts: 29


View Profile Email
« on: June 15, 2017, 10:01:16 AM »

Hello,

I can't seem to set the cells in my datagrid to editable. I'm using this as an example:

https://www.jeasyui.com/tutorial/datagrid/datagrid12.php

They say I should be able to do this:

editor: 'text'

Here's how I'm defining my grid:

        $('#ROIDataGrid').datagrid({
            columns: [[

      { field: 'fields', width: 100 },
                { field: 'HAndS', title: 'H&S', width: 100, editor: 'text' }, // <-- making this column editable.
                { field: 'ENV', title: 'ENV', width: 100 },
                { field: 'ECN', title: 'ECN', width: 100 }
            ]],

       data: [

      { fields: '\'You\' project', HAndS: '123.0', ENV: '', ECN: '' },
                { fields: '\'Other\' project', HAndS: '', ENV: '', ECN: '' },
                { fields: 'Colors', HAndS: '<input type="color" value="#FF0000" style="width: 100%;">', ENV: '', ECN: '' }
            ]
        });

Here's what it looks like:



Yet, I can't edit the cell with 123.0 in it. Please advise.
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!