EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: rezzonico on July 17, 2015, 04:34:03 AM



Title: Disable editing
Post by: rezzonico on July 17, 2015, 04:34:03 AM
Hi all,

I have a datagrid similar to the following example:
http://www.jeasyui.com/tutorial/datagrid/datagrid15_demo.html

As you can try in the demo, the user can edit the column "Unit Cost".
Since the column "Unit Cost" is calculated, I don't want that this column is editable by the user.
How is it possible ?

Any help is appreciated.
Miche


Title: Re: Disable editing
Post by: eagleeye on July 17, 2015, 07:52:20 AM
Use data-options

readonly:true and
disabled:true

Code:
 <th field= "fecha_fin_real"   
 fixed="true"
width="115" 
align="center" 
editor="{
type:'datetimebox',
options:{disabled:true,editable:false,readonly:true,currentText:'Hoy',closeText:'Cerrar',okText:'Aceptar',showSeconds:false}}" >
Fecha RealTer
</th>


Title: Re: Disable editing
Post by: rezzonico on July 18, 2015, 07:04:00 AM
Thanks a lot !

Regards
Miche