EasyUI Forum
September 14, 2025, 10:58:11 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: datagrid-cellediting : highlight row  (Read 11277 times)
korenanzo
Guest
« on: May 16, 2016, 09:36:56 AM »

Hi,

when in cell edit mode, the current line is higlighted, css class  datagrid-row-editing

but if I select a cell in a column that is readonly, the row is no more in edit mode, so it loses the    datagrid-row-editing class

Is it possible to maintain the edit mode?

thanks,
RIc
Logged
jarry
Administrator
Hero Member
*****
Posts: 2298


View Profile Email
« Reply #1 on: May 16, 2016, 03:31:41 PM »

In cell editing mode, you can not select a whole row. You are only allowed to select cells on a row.
Logged
korenanzo
Guest
« Reply #2 on: May 17, 2016, 12:49:19 AM »

Yea, I agree,

but I don't want to select a row, I want the highlight !

look,
this is a row with a cell in edit mode
you can see the blue line  , it is provided by the datagrid-row-editing class

the gray column is a readonly column , provided by class="col_readonly"

when I am over the readonly column,  datagrid-row-editing disappears



Id like to have the row higlited even in this case, because if I move between the cells using the keyboard, the flashing effect is really bad

here you can see the effect
https://dl.dropboxusercontent.com/u/1181512/jeasy/c.mov


thanks

RIc
Logged
korenanzo
Guest
« Reply #3 on: May 20, 2016, 03:30:50 AM »

so,

no possibility to highlight the row on which the currentCell is, when it (the cell) is readonly ?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2298


View Profile Email
« Reply #4 on: May 20, 2016, 06:28:12 AM »

When enable cell editing, the highlighting row is disabled and the highlighting cell is enabled. The newest 'datagrid-cellediting.js' file can be downloaded from http://www.jeasyui.com/extension/datagrid_cellediting.php
Logged
korenanzo
Guest
« Reply #5 on: May 20, 2016, 08:27:06 AM »

thank you jarry

anyway it not satisfies my needs .

I've patched it in this way:

Code:
onBeforeCellEdit: function (index, field) {
var o = $(this);
if  ([mycell is readonly..])
{
var panel = o.datagrid('getPanel').focus();
var cell = panel.find('td.datagrid-row-selected');
var oldTr=panel.find('tr.datagrid-row-editing');
if(oldTr)
oldTr.removeClass('datagrid-row-editing');
if(cell)
{
var tr = cell.closest('tr.datagrid-row');
if(tr)
tr.addClass('datagrid-row-editing');
}
return

 
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!