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

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

6 Answers 107 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Brieuc
Top achievements
Rank 1
Brieuc asked on 14 Jun 2016, 03:07 PM
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

6 Answers, 1 is accepted

Sort by
0
Brieuc
Top achievements
Rank 1
answered on 16 Jun 2016, 09:08 AM

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

Sorry for the mistake.

0
Yana
Telerik team
answered on 16 Jun 2016, 11:14 AM
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.
0
Brieuc
Top achievements
Rank 1
answered on 20 Jun 2016, 07:45 AM
Thank you a lot for your answer !
0
Brieuc
Top achievements
Rank 1
answered on 20 Jun 2016, 10:11 AM

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 ?

0
Yana
Telerik team
answered on 21 Jun 2016, 12:14 PM
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.
0
Brieuc
Top achievements
Rank 1
answered on 21 Jun 2016, 02:42 PM

Thank you for your time and consideration Yana.

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

Tags
GanttView
Asked by
Brieuc
Top achievements
Rank 1
Answers by
Brieuc
Top achievements
Rank 1
Yana
Telerik team
Share this question
or