how to Iterate GanttView TaskSource

4 posts, 0 answers
  1. Luis Gilbert
    Luis Gilbert avatar
    15 posts
    Member since:
    Jul 2009

    Posted 15 Dec 2013 Link to this post

    I'm trying to store a GanttView TaskSource into my SQL database.
    How can I iterate GanttView TaskSource (considering that TaskSource could have N deep levels)?
    Is there any sample project?
    Is there a better approach to store this data into database?

    Thanks!

    LMG
  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 16 Dec 2013 Link to this post

    Hi Luis,

    You can check the following forum thread where we have attached a sample project which demonstrates how to use RadGanttView with a DB as source:
    http://www.telerik.com/community/forums/wpf/ganttview/sql-database.aspx

    I'm also attaching the archived project to the post. The archive also includes the SQL script for creating the needed initial DB table.

    Hope this helps. If you have any further questions let us know.

    Regards,
    Kalin
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
  4. Luis Gilbert
    Luis Gilbert avatar
    15 posts
    Member since:
    Jul 2009

    Posted 16 Dec 2013 Link to this post

    I appreciate your extremely fast reply. Thanks!

    But actually, I was looking for a way to iterate through all tasks contained in TaskSource.
    The main reason for this is that I need to make some very custom validations before data goes to SQL database.

    So, basically I need to recursively iterate through all taks in TaskSource considering that user can create N levels..

    I was thinking something like "GetAllItemContainers" method mentioned in this link:
    http://www.telerik.com/help/silverlight/radtreeview-how-to-iterate-through-treeviewitems.html


    Thanks again!
  5. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 18 Dec 2013 Link to this post

    Hi Luis,

    Unfortunately the GanttView doesn't provide such a built in method, but you could easily implement a custom one. You will just need to go through all the Children of each task recursively and do the custom validation. I have prepared a sample project which demonstrates how this can be achieved (check the Output window).

    Hope this works for you.

    Regards,
    Kalin
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top