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

Customizing Columns and Baseline Variance

Hi,

I am trying to customize the columns in the GanttControl but when I do, it stops calculating the variances,

I want to hide some columns basically, but I still want to see the Finish Variance. My task details' properties for Finish and BL Finish are filled.
This is the way I am customizing the columns;

ganttChart.LoadVarianceTableView();
ganttChart.ShowAddNewColumn = false;
ganttChart.GanttGrid.Columns.RemoveAt(2);
ganttChart.GanttGrid.Columns.RemoveAt(2);
ganttChart.GanttGrid.Columns.RemoveAt(3);
ganttChart.GanttGrid.Columns.RemoveAt(4);
ganttChart.GanttGrid.Columns.RemoveAt(6);
ganttChart.GanttGrid.ReadOnly = true;

When I comment out the column removals, the variances are being calculated. I tried to go over the CustomizedTable sample but couldnt solve the problem.
I am guessing that the BL variances are calculated based on the specific indexes instead of mapping names.

Thanks in advance for any help.

10 Replies

MK Mehmet Kucuk May 30, 2016 01:44 AM UTC

I actually found a way around by simply setting 0 for the width of the columns that I want to remove;

ganttChart.LoadVarianceTableView();
ganttChart.GanttGrid.Columns[2].Width = 0;
ganttChart.GanttGrid.Columns[3].Width = 0;
ganttChart.GanttGrid.Columns[5].Width = 0;
ganttChart.GanttGrid.Columns[7].Width = 0;
ganttChart.GanttGrid.Columns[10].Width = 0;
ganttChart.ShowAddNewColumn = false;
ganttChart.ItemsSource = tasks;

But I would still appreciate if I could learn how to use insert/remove columns without losing functionality.


RA Rachel A Syncfusion Team May 30, 2016 06:45 AM UTC

Hi Mehmet, 

Thanks for contacting Syncfusion support. 

If we insert and remove columns  from the Columns collection, the baseline variance values are getting displayed correctly in the grid. We have prepared the sample based on this scenario and you can download the sample from the following location. 


If you still able to reproduce the problem, please revert to us by reproducing the issue in provided sample which will be helpful to provide you a solution. 

Regards, 
Rachel. A 



MK Mehmet Kucuk May 30, 2016 11:27 PM UTC

Hi Rachel,

Your help is much appreciated. However I couldn't run the sample properly.

First, there was an out of range error in the GanttGrid_Loaded event. I corrected that one but now I am getting a null reference error in Syncfusion.Gantt.Wpf.dll.  It only works when I comment out the loaded event but then obviously the gantt grid has the standard variance table view.

private void GanttGrid_Loaded(object sender, RoutedEventArgs e)
        {
            var collection = (Gantt.GanttGrid.Columns as ObservableCollection<GridTreeColumn>);
            for(int i=0;i</*=*/Gantt.GanttGrid.Columns.Count;i++)
            {
               
                if ((Gantt.GanttGrid.Columns[i] as GridTreeColumn).MappingName == "Id")
                {
                   collection.Remove(Gantt.GanttGrid.Columns[i]);                    
                }
                else if ....




MK Mehmet Kucuk May 30, 2016 11:58 PM UTC

About the Baseline, I want to add one more query.

As an ASP.NET control, gantt has a capability of rendering another bar in the chart to represent baseline. ( http://asp.syncfusion.com/demos/web/gantt/baseline.aspx )

Is there a way of doing so for WPF? I have checked the WPF API Reference but couldn't find the same properties. I found a property for TaskDetails, "Baseline" which is set&get a double value but I couldn't understand what does this property actually do.

Thanks for any help.

Kind Regards.





DA Devi Aruna Maharasi Murugan Syncfusion Team May 31, 2016 12:38 PM UTC

Hi Mehmet, 
  
Thanks for your updates. 
  
Query 1: Regarding sample execution problem 
We are unable to reproduce the issue in the sample with version 14.1.0.46 assemblies. We request you to upgrade the latest product version from the below link, 
  
  
If you still able to reproduce the problem, please update us with the stack trace information which will be helpful to provide a solution. 
  
Query 2: Baseline representation in gantt chart feature 
We have already logged feature request on this requirement and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.  
  
  
Query 3: I found a property for TaskDetails, "Baseline" which is set&get a double value  
TaskDetails class is to hold details about the task. 
  
Regards, 
Devi M 



MK Mehmet Kucuk June 2, 2016 06:10 AM UTC

Hi,

As suggested, I am trying to upgrade my product version to 14.1.0.46.

Currently, I am using Essential Studio 14.1.0.41. 

I downloaded the Link Install file of 14.1.0.46 (as there is no Essential Studio Version for that). 

I installed it to the following folder "C:\Program Files (x86)\Syncfusion\Link Install\14.1.0.46" as suggeted by the app. 

So, now I have "C:\Program Files (x86)\Syncfusion\Essential Studio\14.1.0.41\" and "C:\Program Files (x86)\Syncfusion\Link Install\14.1.0.46". However, when now I try to drag and drop a control, I am receiving an error.

Could you please give me a walkthrough for how to upgrade from 14.1.041 to 14.1.046? Should I just swap the files from .46 folder to .41 folder?

Kind Regards.




DA Devi Aruna Maharasi Murugan Syncfusion Team June 2, 2016 12:15 PM UTC

Hi Mehmet, 
  
We are sorry for the inconvenience. 
  
Please find the following responses for your queries. 
  
Q1) I downloaded the Link Install file of 14.1.0.46 (as there is no Essential Studio Version for that). 
  
A1) Unlike Syncfusion Essential Studio setup, Link Install setup doesn’t have the feature of configuring Syncfusion controls in to Visual Studio toolbox. Syncfusion Link Install setup contains only the Essential Studio assemblies which is preferred for Build Server. 
  
v14.1.0.41 is Essential Studio Volume release version and v14.1.0.46 is Service Pack release version. We are providing only the platforms setup in Service Pack releases. 
  
We are providing the following platforms setup in Service Pack releases. 
  
1. ASP.NET MVC
2. ASP.NET
3. JavaScript
4. LightSwitch HTML
5. LightSwitch Silverlight
6. Windows Forms
7. WPF
8. WinRT
9. JavaScript
10. Silverlight
11. Windows Phone
12. Android
13. iOS
14. Xamarin
14. MVC Extension
15. Universal Windows
16. CAB Add-on
17. QTP Add-on
18. Source Add-on
19. Webkit HTML Converter
20. WPF Theme Studio
 
  
Q2) Could you please give me a walkthrough for how to upgrade from 14.1.041 to 14.1.046? Should I just swap the files from .46 folder to .41 folder? 
  
A2) In order to upgrade your projects to the latest v14.1.0.46, please download and install the platforms you need from the following download link. 
  
  
Please refer the following KB article link to know about how to generate the unlock key for respective versions. 
  
  
After installing the latest Syncfusion version, you can upgrade your project references to the latest Syncfusion using the Syncfusion Project Migration utility. If you are using Windows Forms, WPF, Silverlight and ASP.NET projects, please follow the steps suggested in the below documentation link to migrate your project references to latest version v14.1.0.46 
  
  
If you are using ASP. NET or ASP.NET MVC (Web) or ASP.NET MVC (Classic) project, please follow the steps suggested in the following documentation link to migrate your projects. 
  
  
Regards, 
Devi M 



MK Mehmet Kucuk June 3, 2016 12:11 AM UTC

Hi,

I am sorry but this is not working at all on my end. I am a newbie developer and find this service pack upgrade unnecessarily complicated.

I installed the Link Install version of service pack 14.1.0.46. All good. It installed successfully to the following folder: C:\Program Files (x86)\Syncfusion\Link Install\

Then, I ran the assembly manager located in: C:\Program Files (x86)\Syncfusion\Link Install\14.1.0.46\Utilities\Assembly Manager

And, it didn't work. Because the manager is looking in the folder: C:\Program Files (x86)\Syncfusion\Essential Studio\14.1.0.41\precompiledassemblies\14.1.0.46\

Ok, so I copied the content in: C:\Program Files (x86)\Syncfusion\Link Install\14.1.0.46\precompiledassemblies to: C:\Program Files (x86)\Syncfusion\Essential Studio\14.1.0.41\precompiledassemblies\14.1.0.46\

Ran the assembly manager, and now it worked.

I checked my GAC folder and found this: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Syncfusion.Gantt.Wpf\v4.0_14.1460.0.46__3d67ed1f87d44c89 so i guess I am on the right path.

I changed every reference in my application bin to the upgraded .dll and .xml from: C:\Program Files (x86)\Syncfusion\Essential Studio\14.1.0.41\precompiledassemblies\14.1.0.46\
Then I ran the project migration tool in: C:\Program Files (x86)\Syncfusion\Essential Studio\14.1.0.41\Utilities\Project Migration
In the Essential Studio version, I entered: "14.1.0.46" and performed the action.

I opened my project and saw that all the syncfusion references are now unresolved.

Can you please advise me in a more detailed fashion on how to upgrade to the new service pack? A step-by-step walk-through would be much appreciated. I think this could be beneficial for other users as well.

Thank you so much for your time.

Kind Regards.


MK Mehmet Kucuk June 3, 2016 12:18 AM UTC

An Update:

I think the problem is with the project migration tool. I opened my .cdproj file with a notepad and manually changed the versions in my references and now they are working.

However, when I ran Syncfusion Reference Manager in Visual Studio 2015, I still cant see version 14.1.0.46. There is only 14.1.0.41.

Kind Regards.




MS Manivannan Sundararajan Syncfusion Team June 3, 2016 04:49 PM UTC

Hi Mehmet,

We are sorry for the inconvenience.

We are unable to reproduce the reproduce the File not found error in Assembly Manager.

As we informed in our previous update, Syncfusion Link Install setup contains only the Essential Studio assemblies which is preferred for Build Server.

For development purposes, please download and install the Platform setup you need from the following link and use the Syncfusion Project Migration utility to migrate your projects to the latest v14.1.0.46.

https://www.syncfusion.com/support/directtrac/downloads/14_1_0_46  

Now the Project Migration utility will upgrade your projects to the latest v14.1.0.46 .

If you still face any issues even after installing the Platform setup in the v14.1.0.46, please let us know.

Regards,
Manivannan S.


Loader.
Up arrow icon