Update RadDropDownTree if task is updated

9 posts, 1 answers
  1. Felix
    Felix avatar
    42 posts
    Member since:
    Sep 2014

    Posted 11 Sep 2014 Link to this post

    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
  2. Felix
    Felix avatar
    42 posts
    Member since:
    Sep 2014

    Posted 16 Sep 2014 Link to this post

    Does no one have a solution for my problem?!?

    Regards,
    Felix
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 16 Sep 2014 Link to this post

    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.

     
  5. Felix
    Felix avatar
    42 posts
    Member since:
    Sep 2014

    Posted 17 Sep 2014 in reply to Nencho Link to this post

    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
  6. Answer
    Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 22 Sep 2014 Link to this post

    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.

     
  7. Felix
    Felix avatar
    42 posts
    Member since:
    Sep 2014

    Posted 22 Sep 2014 in reply to Hristo Valyavicharski Link to this post

    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
  8. Dan
    Dan avatar
    11 posts
    Member since:
    Dec 2015

    Posted 02 Feb in reply to Felix Link to this post

    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.

     

  9. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 04 Feb Link to this post

    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
  10. Dan
    Dan avatar
    11 posts
    Member since:
    Dec 2015

    Posted 04 Feb in reply to Hristo Valyavicharski Link to this post

    Thank you Hristo. I will try that.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017