EasyUI Forum
April 19, 2024, 02:15:43 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: The colspan-mergeCells propertygrid is Bugged?  (Read 5241 times)
Don_Juan
Newbie
*
Posts: 20


View Profile
« on: October 18, 2017, 06:04:38 AM »

Hi,
using colspan to join columns in a propertygrid, I noticed that, it works until I select a line; Once selected and exited from the selected cell, colspan no longer works.

Code:
//count = Number of row
//colSpan = How many column merge

function merge(count, colSpan=3){
    $('#detailsView').propertygrid('mergeCells', {
        index:   count,
        field:   'value',
        colspan: colSpan
    });
}
The effect into attachement (Before.jpg and After.jpg)

I use Jquery-easyui-1.5.3-patch

Do you know how to help me?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: October 18, 2017, 07:06:44 PM »

You should merge cells after finish the editing action.
Code:
function mergeCells(){
$(this).propertygrid('mergeCells', {
index: 1,
field: 'value',
rowspan: 2
})
}
$('#pg').propertygrid({
onLoadSuccess: mergeCells,
onAfterEdit: mergeCells
});
Logged
Don_Juan
Newbie
*
Posts: 20


View Profile
« Reply #2 on: October 20, 2017, 02:09:29 AM »

OK thanks
How do I apply only to certain values?
When do I need to call it that way?

Code:
function mergeCells(rowIndex){
    $(this).propertygrid('mergeCells', {
        index: rowIndex,
        field: 'value',
        rowspan: 3
    })
}
$.each(valuesToMerge, function(rowIndex,value) {
    $('#pg').propertygrid({
        onLoadSuccess: mergeCells(rowIndex),
        onAfterEdit: mergeCells(rowIndex)
    });
});

Or how should I do it?
Thanks.
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!