EasyUI Forum
May 03, 2024, 03:46:15 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: resize datagrid columns, the style changes  (Read 12547 times)
robert0814
Newbie
*
Posts: 1


View Profile
« on: November 04, 2012, 05:39:15 AM »

Hi all:
I wanna report a bug here
this demo is downloaded from http://www.jeasyui.com/download/downloads/jquery-easyui-1.3.1.zip
launch datagrid.html
When I resize the column width, and drag over the column itself, the style will chaos, please check 2.jpg

moreover, if set font family equals tahoma, the style changed.
I cannot upload screenshot cos the size limit


sorry about my poor english.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 04, 2012, 08:04:11 PM »

This error occur when group columns are defined and the header's width of group column exceed the total length of its sub columns. To solve this issue, adjust the group column width when finished column width. The fixing code can be written in 'onResizeColumn' event.
Code:
$('#dg').datagrid({
onResizeColumn:function(field,width){
var dc = $(this).data('datagrid').dc;
var cells = dc.header1.add(dc.header2).find('div.datagrid-cell-group').css('width',0);
cells.each(function(){
$(this)._outerWidth($(this).parent().width());
});
}
});
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!