EasyUI Forum
May 01, 2024, 09:03:39 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: Disable a cell in datagrid cell editing  (Read 8192 times)
neos
Newbie
*
Posts: 31


View Profile
« on: March 31, 2014, 07:25:30 PM »

Dear All,

I have a case with datagrid in cell editing. in my case i have two columns ( no stock and picked) with editor type checkbox. if status in cell no stock is "yes" then in cell picked cannot be edit. if status in cell no stock is "no" then in cell picked can be edit.

how i use the code ?  Huh
Logged
neos
Newbie
*
Posts: 31


View Profile
« Reply #1 on: April 01, 2014, 08:10:58 PM »

Any help ? I'm so confused  Huh
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #2 on: April 01, 2014, 08:48:07 PM »

To disable the editing on a cell, remove the 'editor' property from column options. To enable editing again, restore the 'editor' property value. The code below shows how to disable the 'editor' property for a specified field.
Code:
var dg = $('#dg');
var col = dg.datagrid('getColumnOption', field);
col.editor1 = col.editor;
col.editor = null;
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!