Hello Telerik-Team,
I know in some threads this problem is adressed, but I could not found a solution.
This is what I am doing, or rather would do, in my project.
I have a vertical RadSplitter control which contains in the left pane a RadScheduler and in the right pane another RadSplitter control. The RadSplitter control in the right pane is inside a RadSlidingZone/RadSlidingPane control.
At the start, the RadSlidingZone on the right is slided out, so the RadScheduler control is visible in the maximum width, which is working perfectily.
My goal is now, only to show a zoned out RadSlidingZone if the currently selected view of the RadScheduler (the left part of the vertical RadSplitter) is DayView or WeekView, i.e. when the user switches to the MonthView two two things should happen:
1. If in the DayView or in the WeekView the right part, i.e. the SlidingZone, was visible, it should zone out, so the month view has its maximal width
2. The button to slide in or out the sliding zone should be disabled, or at least not work if the user clicks it.
The second part works fine, i.e. I wrote a javascript function which is called with the right sliding out event, i.e. if the user clicks the SlidingZone button, I check in the java script method if the selected view is the month view, and if yes the event will be canceled (I found this trick on the forum, thanks a lot :-))
My problem is the first thing:
I found in this forum a way to automatically slide out the sliding zone, using the javascript functions RadSlidingZone.undock(<SlidingPaneId>) (if the pane is docked) or RadSlidingZone.collapse(<SlidingPaneId>) (if the pane is only expanded)
The RadSlidingZone.collapse() method works fine, i.e. at after changing the view (I do not use the navigation commands but an own combo box, i.e. I cannot use the OnNavigationCommand client event) and after loading the new html page I run a little java script . If the selected view is then month view, I call the collapse java script method. Naturally this works only if the RadSlidingZone is NOT DOCKED, but only expanded.
But if I change to day view, expand the SlidingZone and dock it (or use the property to dock it automatically after expanding it) and then change back to the month view, the docked SlidingZone will not undock. I know, in this case I have to use the undock() method of the SlidingZone, but when I use this, the return value is simply false. When I debug this, the RadSlidingZone property with the ID of the expanded AND the property with the ID of the DOCKED pane are both "null", therefore the undock() method will not work (neither the collapse() method).
I read in the forum that it is possible to undock the RadSlidingPane back on the server in C# (the C#-property which holds the ID of the docked pane can simply be set to zero). I tried this, and yes, the former docked RadSlidingPane will vanish BUT the left pane of my RadSplitter control, i.e. the RadScheduler control, will not be expanded to the right. It's width will not be changed, so that the RadScheduler pane does not change but the docked sliding pane will undock and therefore the area on the right of my vertical RadSplitter control is empty.
Do you have any ideas?
Is it possible to simulate the click of the undock button with java script? Because if the user first clicks the undock button and then changes the view type all works.
Greetings,
Richard
I know in some threads this problem is adressed, but I could not found a solution.
This is what I am doing, or rather would do, in my project.
I have a vertical RadSplitter control which contains in the left pane a RadScheduler and in the right pane another RadSplitter control. The RadSplitter control in the right pane is inside a RadSlidingZone/RadSlidingPane control.
At the start, the RadSlidingZone on the right is slided out, so the RadScheduler control is visible in the maximum width, which is working perfectily.
My goal is now, only to show a zoned out RadSlidingZone if the currently selected view of the RadScheduler (the left part of the vertical RadSplitter) is DayView or WeekView, i.e. when the user switches to the MonthView two two things should happen:
1. If in the DayView or in the WeekView the right part, i.e. the SlidingZone, was visible, it should zone out, so the month view has its maximal width
2. The button to slide in or out the sliding zone should be disabled, or at least not work if the user clicks it.
The second part works fine, i.e. I wrote a javascript function which is called with the right sliding out event, i.e. if the user clicks the SlidingZone button, I check in the java script method if the selected view is the month view, and if yes the event will be canceled (I found this trick on the forum, thanks a lot :-))
My problem is the first thing:
I found in this forum a way to automatically slide out the sliding zone, using the javascript functions RadSlidingZone.undock(<SlidingPaneId>) (if the pane is docked) or RadSlidingZone.collapse(<SlidingPaneId>) (if the pane is only expanded)
The RadSlidingZone.collapse() method works fine, i.e. at after changing the view (I do not use the navigation commands but an own combo box, i.e. I cannot use the OnNavigationCommand client event) and after loading the new html page I run a little java script . If the selected view is then month view, I call the collapse java script method. Naturally this works only if the RadSlidingZone is NOT DOCKED, but only expanded.
But if I change to day view, expand the SlidingZone and dock it (or use the property to dock it automatically after expanding it) and then change back to the month view, the docked SlidingZone will not undock. I know, in this case I have to use the undock() method of the SlidingZone, but when I use this, the return value is simply false. When I debug this, the RadSlidingZone property with the ID of the expanded AND the property with the ID of the DOCKED pane are both "null", therefore the undock() method will not work (neither the collapse() method).
I read in the forum that it is possible to undock the RadSlidingPane back on the server in C# (the C#-property which holds the ID of the docked pane can simply be set to zero). I tried this, and yes, the former docked RadSlidingPane will vanish BUT the left pane of my RadSplitter control, i.e. the RadScheduler control, will not be expanded to the right. It's width will not be changed, so that the RadScheduler pane does not change but the docked sliding pane will undock and therefore the area on the right of my vertical RadSplitter control is empty.
Do you have any ideas?
Is it possible to simulate the click of the undock button with java script? Because if the user first clicks the undock button and then changes the view type all works.
Greetings,
Richard