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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

some questions about gantt

Thread ID:

Created:

Updated:

Platform:

Replies:

131918 Aug 3,2017 09:43 AM UTC Aug 7,2017 04:19 AM UTC ASP.NET Web Forms 3
loading
Tags: Gantt
Martin Sickel
Asked On August 3, 2017 09:43 AM UTC

Hi together

1. Is it possible to change the order of the columns in the tree grid via darg and drop and save it  then for the user?
2. How can the column chosser setting be saved per User?

Thanks for help

Martin

Jayakumar Duraisamy [Syncfusion]
Replied On August 5, 2017 06:29 AM UTC

Hi Martin, 
Please find the response below, 
Query 1:  Is it possible to change the order of the columns in the tree grid via darg and drop? 
Answer: At present, we don’t have drag and drop support in Gantt. Hence, we have logged a feature report as “Support for column reordering in Gantt”. 
This feature can be tracked through our Feature Management. 
 
This feature will be implemented in any of our upcoming main release. 
Query 2: How can the column chooser setting be saved per User? 
Answer: We can save column chooser settings by button click action using Ajax post. We have prepared a sample that save column settings by custom toolbar item click action. For that enabled “toolbarClick” event and save the updated columns settings as string format to database using Ajax request.  
In the Column table, we have customerId column. Hence, we can save separate column settings per user. 
<ej:Gantt ID="Gantt" runat="server" ToolbarClick="toolbarClick" 
//.. 
> 
<ToolbarSettings ShowToolbar="true">  
             <CustomToolbarItems> 
                     <ej:GanttCustomToolbarItem Text="Save" TooltipText="Save" />                     
                </CustomToolbarItems>   
                </ToolbarSettings>   
</ej:Gantt> 
 
function toolbarClick(args){ 
                if (args.itemName == "Save") { 
                    var columns = args.model.columns, 
                        cName = [], cVisible = []; 
                    for (var i = 0; i < columns.length; i++) { 
                        if (columns[i].mappingName) { 
                            cName.push(columns[i].mappingName); 
                            cVisible.push(columns[i].visible); 
                        } 
                    } 
                    $.ajax({ 
                        type: "POST", 
                        url: '/GanttSample.aspx/updateColumnData', 
                        async: false, 
                        data: JSON.stringify({name:cName.toString() ,visible: cVisible.toString()}), 
                        contentType: "application/json; charset=utf-8", 
                        dataType: "json", 
                    }); 
 
                } 
            } 
In the load event, we can change the column order and visible property of the columns collection. At the load time, we have to pass the current customerId in the Ajax post to the server method and it will return the respective customer column settings details in the success method. Based on the saved column mapping name order and visible property, column will be render in the Gantt.  
function load(args) {                 
                var columns = this.getColumns(), 
                    cName = [],cVisible = []; 
                $.ajax({ 
//.. 
                 success: function (result) { 
                        var col = result.d; 
                        cName = col.Name.split(','), 
                    cVisible = col.Visible.split(','); 
                    } 
}) 
                 for (var i = 0; i < cName.length; i++) { 
                    var temp = {},cIndex = -1; 
                    $.each(columns, function (index, col) { 
                        if (col.mappingName == cName[i]) { 
                            col.visible = cVisible[i] == "true"? true : false; 
                            temp = col; 
                            cIndex = index; 
                            return false; 
                        } 
                    });                     
 
We have prepared a sample for your reference. Please find the sample location as below, 
Please let us know, if you required any other assistant. 
Regards, 
Jayakumar D 


Martin Sickel
Replied On August 6, 2017 01:28 PM UTC

Thanky you

One of the best Supports I have ever seen :-)


Jayakumar Duraisamy [Syncfusion]
Replied On August 7, 2017 04:19 AM UTC

Hi Martin, 
Thanks for the update. 
Regards, 
Jayakumar D 


CONFIRMATION

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.

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

;