Get the position of the GanttPresenterSplitter in a <telerik:RadGanttView>

7 posts, 0 answers
  1. Brieuc
    Brieuc avatar
    6 posts
    Member since:
    Jun 2016

    Posted 14 Jun Link to this post

    Hi all,

    I am working on a WPF application using Telerik (http://www.telerik.com/) and coded in C# .NET.
    My following question goes over an ASP .NET page using the model “Code behind” to implement the logic of the page.

    I would like to get the position of the GanttPresenterSplitter in a <telerik:RadGanttView>.
    This information would allow me to set the position of another element in another part of the same screen.
    I would also know if it is possible to add an event handler on that GanttPresenterSplitter in order to get its position each time that line moves.

    The ASP .NET page is split into 3 parts (please find in attachment "draft_screen.png") :
    - Red square : <telerik :RadGanttView>
    - Green square : <telerik :RadGridView>
    - Blue square : <telerik :RadScheduleView>

    As you can see, there is a dividing line between <telerik :RadGridView> and <telerik :RadScheduleView>.
    I would like that line moves at the same time and same position as the GanttPresenterSplitter in the RadGanttView.

    Using a more explicit picture based on an example (please find in attachment "explicit_screen.png") :
    - Orange line : GanttPresenterSpliter
    - Purple line : GridSplitter

    My point is to coordinate the orange and the purple lines in order they have the same position all the time.

    Any help will be much appreciated J
  2. Brieuc
    Brieuc avatar
    6 posts
    Member since:
    Jun 2016

    Posted 16 Jun in reply to Brieuc Link to this post

    It is not an ASP.NET page, but a XAML page.

    Sorry for the mistake.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 16 Jun Link to this post

    Hello Brieuc,

    There is no straightforward way to get the position of the GanttPresenterSplitter, however, you could, for example, get the Width of the Grid area of the GanttView, and more specifically the width of the visible area. It is presented by a ScrollBar element, so you could subscribe to its SizeChanged event to handle when the Grid area is resized.
    I have prepared a sample example to demonstrate the approach, please download the attachment and give it a try.

    Regards,
    Yana
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  5. Brieuc
    Brieuc avatar
    6 posts
    Member since:
    Jun 2016

    Posted 20 Jun Link to this post

    Thank you a lot for your answer !
  6. Brieuc
    Brieuc avatar
    6 posts
    Member since:
    Jun 2016

    Posted 20 Jun in reply to Yana Link to this post

    This is actually working fine and I would like to improve it  by adding a "width limit".

    How could I manage to prevent the user from resizing the left grid bigger than the half screen ?

  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 21 Jun Link to this post

    Hi Brieuc,

    I am afraid that there is no easy way to restrict the Grid width - RadGanttView does not provide an event or notification when the GanttPresenterSplitter is resized and the previously suggested approach is a work-around to get this information.

    We're sorry for any inconvenience caused.

    Regards,
    Yana
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  8. Brieuc
    Brieuc avatar
    6 posts
    Member since:
    Jun 2016

    Posted 21 Jun in reply to Yana Link to this post

    Thank you for your time and consideration Yana.

    It was only to go further with Telerik, no inconvenience has been caused !

Back to Top
UI for WPF is Visual Studio 2017 Ready