We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Fixed column width with full width in treegrid

How can I make column width when load tree grid with resize mode 'fixed column' to full in tree grid like normal mode
M. Salah

1 Reply

JS Jonesherine Stephen Syncfusion Team February 24, 2017 11:55 AM UTC

Hi Mohamed, 
Thanks for contacting Syncfusion support. 
As per our current behavior we can’t able to stretch the column to auto width using “FixedColumns” mode. We have prepared the work around and rendered column with given width values in column collection. We have achieved this by using create client side event and removed the style attribute of other columns. 
Please find the code example below: 
                columnResizeSettings: { 
                    columnResizeMode: ej.TreeGrid.ColumnResizeMode.Normal 
                columns: [ 
{ field: "taskID", headerText: "Task Id", editType: "numericedit", width: "45" }, 
{ field: "taskName", headerText: "Task Name", editType: "stringedit", width: "200" },                 
               create: function (args) { 
             var $cols1 = this.getContentTable().children("colgroup").find("col"), 
             $cols2 = this.getHeaderTable().children("colgroup").find("col"); 
We have also prepared the sample based on this. Please find the sample from below location 
Jone sherine P S 

Live Chat Icon For mobile
Up arrow icon