Toggle ShowCriticalPath

Trying to bind the ShowCriticalPath value to a toolbar checkbox

<CheckBox x:Name="CheckBoxShowCriticalPath" Content="Show Critical Path" IsChecked="False"/>

        <syncfusion:GanttControl Grid.Column="0" Grid.Row="2"  x:Name="Gantt"
                                 ItemsSource="{Binding TaskCollection}"                                  
                                 WeekBeginsOn="Monday" 
                                 ShowWeekends="{Binding ElementName=CheckBoxShowWeekends, Path=IsChecked}"
                                 ShowCriticalPath="{Binding ElementName=CheckBoxShowCriticalPath, Path=IsChecked}" 
                                 ValidationMode="Auto"
                                   ......

Toggling weekends on and off works OK but the same technique for toggling critical path just generates an error "System.Collections.Generic.KeyNotFoundException: 'The given key '' was not present in the dictionary.'" when setting ShowCriticalPath to true. If the checkbox starts off checked I can uncheck it OK but cannot set ShowCriticalPath back to true again. 

4 Replies 1 reply marked as answer

SS Sridevi Sivakumar Syncfusion Team March 15, 2021 11:23 AM UTC

Hi Russ,

Greetings from Syncfusion.

We have checked the reported query with the latest NuGet and working fine at our end. We have prepared a sample for your reference. Please have a sample from the below link

https://www.syncfusion.com/downloads/support/forum/163481/ze/Gantt-1800989492

So, could you please check the issue with the attached sample and let us know whether it is reproduced or not?

Can you please provide detailed information on the reported query?  


·       Can you please share the issue reproducing video?  
·       If the issue is not reproduced in the above sample, please revert us by modifying the sample based on your application along with the replication procedure.  
·       Can you share the Syncfusion Gantt NuGet versions to reproduce the reported issue?

Regards,

Sridevi S.
 



SS Sridevi Sivakumar Syncfusion Team March 15, 2021 11:37 AM UTC

Hi Russ,

Greetings from Syncfusion.

We have checked the reported query with the latest NuGet and working fine at our end. We have prepared a sample for your reference. Please have a sample from the below link

https://www.syncfusion.com/downloads/support/forum/163481/ze/Gantt-1800989492

So, could you please check the issue with the attached sample and let us know whether it is reproduced or not?

Can you please provide detailed information on the reported query?  


·       Can you please share the issue reproducing video?  
·       If the issue is not reproduced in the above sample, please revert us by modifying the sample based on your application along with the replication procedure.  
·       Can you share the Syncfusion Gantt NuGet versions to reproduce the reported issue?

Regards,

Sridevi S.
 


Marked as answer

RU Russ March 16, 2021 05:33 PM UTC

Thanks for the reply.  

Your example works OK for me so clearly a problem on my end.  A thought. Could the error come from me not have predecessors in my task model yet? 


SS Sridevi Sivakumar Syncfusion Team March 17, 2021 02:25 PM UTC

Hi Russ,

No, we can load gantt control without predecessors also. We ensured the sample in below sample.

https://www.syncfusion.com/downloads/support/forum/163481/ze/GanttSample-41952367

Since we are not aware of your exact application scenario, we were not able to reproduce this at our end, can you please revert us by modifying the sample based on your application along with replication procedure. This will be helpful for us to provide you better solution at the earliest.

Regards,
Sridevi S.


Loader.
Up arrow icon