Gantt sqldatasource select command with where clause not working

3 posts, 0 answers
  1. Iago
    Iago avatar
    8 posts
    Member since:
    Sep 2016

    Posted 12 Sep Link to this post

    Hello,

    I am using ASP NET AJAX Gantt contro with database provider. I have created a table according to documentation here: http://docs.telerik.com/devtools/aspnet-ajax/controls/gantt/data-binding/database-structure

    It is a readonly control, only for display purposes, but I would like to filter rows in that table according to user selection (year selection is possible). I have just added a where clause:

      'where [Start] between @startInterval and  @endInterval
      and [End] between @startInterval and  @endInterval'

    Even when I can see on Sqldatasource selectedEvent the affected rows >0 and fits the exact number of rows query should return, Gantt diagram displays empty.

    If I remove the where clause, diagram displays perfectly. 

    Is there anything I am not taking into account?

     

    Thank you in advance

     

  2. Peter Milchev
    Admin
    Peter Milchev avatar
    300 posts

    Posted 15 Sep Link to this post

    Hello Iago,

    One possible reason for the missing appointments is if the root appointment does not satisfy the condition in the Where clause. 

    Please find attached a sample project where the "WHERE" clause is working as expected when the parent appointment meets the requirements.

    Once you ensure that all appointments in the range have a valid ParentID, then they should be rendered as expected.

    Regards,
    Peter Milchev
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Iago
    Iago avatar
    8 posts
    Member since:
    Sep 2016

    Posted 16 Oct Link to this post

    Thanks for your help. I have finally got it working setting EnableCaching="false". I do not know exactly why, but it worked for me.

     

Back to Top