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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Fixed column width with full width in treegrid

Thread ID:





129052 Feb 23,2017 12:53 PM UTC Feb 24,2017 11:55 AM UTC JavaScript 1
Tags: ejTreeGrid
Mohamed Salah
Asked On February 23, 2017 12:53 PM UTC

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

Jonesherine Stephen [Syncfusion]
Replied On 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 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon