This is a migrated thread and some comments may be shown as answers.

autoFitColumn and Hierarchy Grid

1 Answer 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 1
Pierre asked on 19 Jun 2015, 03:51 PM

Hi,

I use autoFitColumn function on the first column with a column object as parameter. But it seems that there is a bug because the function applies on the hierarchical column to compute its width.

I have updated the autoFitColumn function from this code :

var newColumnWidth = Math.ceil(Math.max(th.outerWidth(), contentTable.find("tr").eq(0).children("td:visible").eq(index).outerWidth(), footerTable.find("tr").eq(0).children("td:visible").eq(index).outerWidth()));

to this code :

var newColumnWidth = Math.ceil(Math.max(th.outerWidth(), contentTable.find("tr").eq(0).children("td:visible:not(.k-hierarchy-cell)").eq(index).outerWidth(), footerTable.find("tr").eq(0).children("td:visible").eq(index).outerWidth()));

I have added :not(.k-hierarchy-cell) on the selector.

I do not use any footer so there is certainly the same problem on the children selector.

What do you think about it ? 

Thanks for your help.

Regards

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 23 Jun 2015, 10:57 AM
Hi Pierre,

This thread is closely related to the other one that you have posted, and both problems are already fixed. Changes will take effect in all future internal and official builds. The next official release is Q2 2015, due this week.

http://www.telerik.com/forums/autofitcolumn-doesn't-work-properly

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Pierre
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or