EasyUI Forum

General Category => Bug Report => Topic started by: robert0814 on November 04, 2012, 05:39:15 AM



Title: resize datagrid columns, the style changes
Post by: robert0814 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.


Title: Re: resize datagrid columns, the style changes
Post by: stworthy 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());
});
}
});