This is a migrated thread and some comments may be shown as answers.

OnControlAddin Issue

1 Answer 81 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 17 Apr 2015, 08:12 AM

hello guys,

i'm testing this control for developing a gantt for ms dynamics nav. Everything works fine but now i'm searching for a way to manually update the whole view, because i load data async nothing is shown in my gantt when it's loaded on my page. I want the control to completely update it's view when dataload is finished and i don't know which function to use or how to do this.

 

As u can see in pic1 page is open no data is shown.

As u can see in pic2 i only resize width a little bit, ganttPart is updated.

As u can see in pic3 i resize width an height more, gridPart is also updated.

i need a function to do the update, when my dataset i loaded.

 

1 Answer, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 20 Apr 2015, 01:31 PM
Hi Martin,

The issue might lie as the RadGanttView.TasksSource is not notified when the data is loaded.
I suggest binding the RadGanttView.TasksSource to a collection that notifies when it is populated.

I've prepared a sample project demonstrating this approach. Take a look at the Tasks property in the ViewModel class. Whenever it is being set to a new collection it notifies for change.
I've added a button - "Populate tasks" that sets the ViewModel.Tasks to a new ObservableCollection<IGanttTask> and bind the TasksSource to Tasks:
<telerik:RadGanttView Grid.Row="1" TasksSource="{Binding Tasks}" VisibleRange="{Binding VisibleRange}" x:Name="gantt">
...
</telerik:RadGanttView>

Hopefully this helps.

Regards,
Polya
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
GanttView
Asked by
Martin
Top achievements
Rank 1
Answers by
Polya
Telerik team
Share this question
or