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

Update RadDropDownTree if task is updated

8 Answers 140 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Felix
Top achievements
Rank 1
Felix asked on 11 Sep 2014, 12:57 PM
Hello,

I have a RadGantt control and a RadDropDownTree which contains the different tasks of the gantt control (for displaying the assigned resources depending on the selection of the dropdowntree). Both controls are in different RadAjaxPanels. The update of the tasks inside the gantt is performed inside the "OnTaskUpdate" event. Now I want to achive that if the user changes e.g. the title of the task, the dropdowntree should be updated as well. Can somebody help how to do that?

Regards,
Felix

8 Answers, 1 is accepted

Sort by
0
Felix
Top achievements
Rank 1
answered on 16 Sep 2014, 06:37 AM
Does no one have a solution for my problem?!?

Regards,
Felix
0
Nencho
Telerik team
answered on 16 Sep 2014, 08:34 AM
Hello Felix,

If the RadDropDownTree uses the Tasks table of the RadGantt control as an underlying datasource, you could simply call the DataBind() method of the DropDownTree, which would push the control to request its datasource. Thus you will populate the control with the already updated datasource and the modified tasks titles should be applied in the RadDropDownTree control.


Regards,
Nencho
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Felix
Top achievements
Rank 1
answered on 17 Sep 2014, 07:29 AM
Hello Nencho,

I tried your suggestion but when I call the Databind() of the DropDownTree e.g. inside the OnTaskUpdate-event, the DropDownTree still isn't updated. Can you tell me where I have to call the Databind()-method of the DropDownTree?
Another aspect I wonder about is that if I add or update tasks the page isn't fully posted back. The page_load is called but e.g. the prerender-event isn't. I think thats the reason why my DropDownTree isn't updated if I update my tasks inside the gantt.

Regards,
Felix
0
Accepted
Hristo Valyavicharski
Telerik team
answered on 22 Sep 2014, 08:30 AM
Hi Felix,

If the database is updated then you can rebind the DownDropDownTree in the OnTaskUpdate event. However if both controls are in different RadAjaxPanels then the observed behavior is expected. They must be in the same RadAjaxPanel or you will have to use RadAjaxManager, so when task is updated the dropdowntree should be updated too. Please try to disable the ajax to see if it will be working correctly.

Thanks.

Regards,
Hristo Valyavicharski
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Felix
Top achievements
Rank 1
answered on 22 Sep 2014, 10:45 AM
Hello Hristo Valyavicharski,

thank you for your answer. Now I have put the controls inside the same RadAjaxPanel and everthings works fine. Didn't try that before because I am used to call the RaisePostback to update controls in different AjaxPanels, but that didn't work. Thanks

Regards,
Felix
0
Dan
Top achievements
Rank 1
answered on 02 Feb 2016, 04:52 PM

A related question. Maybe I didn't understand this post fully, but I'm trying the following....

protected void RadGantt1_OnTaskUpdate(object sender, TaskEventArgs e) {
     gridProjects.DataBind();
}

I'm trying to update a grid based on changes to gantt. But isn't it true that the bound data source has not updated yet? Is there something like an "AfterTaskUpdate" event?

 

Thank you.

 

0
Hristo Valyavicharski
Telerik team
answered on 04 Feb 2016, 12:28 PM
Hi Dan,

You will have to create a custom provider, then you will have a full control over the CRUD actions. See the RadGantt Custom Entity Provider sample. 

Regards,
Hristo Valyavicharski
Telerik
0
Dan
Top achievements
Rank 1
answered on 04 Feb 2016, 01:59 PM
Thank you Hristo. I will try that.
Tags
Gantt
Asked by
Felix
Top achievements
Rank 1
Answers by
Felix
Top achievements
Rank 1
Nencho
Telerik team
Hristo Valyavicharski
Telerik team
Dan
Top achievements
Rank 1
Share this question
or