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

[Solved] Service and Grouped Views

8 Answers 154 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
SolutionStream
Top achievements
Rank 1
SolutionStream asked on 11 May 2009, 08:50 PM
I have been trying to get resource views working with my Schedule control today and realized that it might not be fully implemented yet.  After doing some searching on your site, I found this article (http://blogs.telerik.com/tsvetomirtsonev/posts/09-02-20/web_service_binding_with_radscheduler_for_asp_net_ajax.aspx) that implied that grouped views are still pending completion. 

Is this true?  If so, do have a date for that release?

Thanks

8 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 12 May 2009, 03:56 PM
Hi Kier,

We're currently working on implementing the support for the grouped views that didn't make it into previous releases. As there are quite a few of them, we would to know which are the most widely used ones, so we can prioritize them. Can you please tell us which view types do you plan to use inr your project?

All the best,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
SolutionStream
Top achievements
Rank 1
answered on 12 May 2009, 06:27 PM
If I understand your question correctly, we are planning on using grouped day and week views.  Additionally, we would like to add date sorting to each of those.


0
T. Tsonev
Telerik team
answered on 14 May 2009, 01:17 PM
Hello Kier,

Thank you, that was exactly the information I was asking for. The resource grouped day and week views are already implemented, so you can use them right away.

I'm not really sure what you mean by "date sorting". Do you mean "grouped by date" as in the demo screenshot? 

If that's the case then you might consider using the normal server-side data binding and make the transition to web service data binding when we're ready with the views you need.

All the best,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
SolutionStream
Top achievements
Rank 1
answered on 14 May 2009, 03:24 PM
The grouped day and week views are implemented in 2009_1_402?  If so, are there any examples? 

Also, the group by date as shown in your screenshot is exactly what we need.  Is this feature way off?
0
Accepted
T. Tsonev
Telerik team
answered on 15 May 2009, 01:30 PM
Hi Kier,

We still haven't uploaded an example or help topic on this subject. We'll do so soon, but in the mean time I'm attaching you a sample site that demonstrates how to use it.

The scheduler is configured as this:
<telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Vista"
    SelectedView="DayView" SelectedDate="2009-04-18">
    <DayView GroupBy="User" />
    <WebServiceSettings Path="~/SchedulerDataService.asmx" ResourcePopulationMode="ServerSide" />
</telerik:RadScheduler>


The key here is ResourcePopulationMode. It has to be set to server-side or manual, as the control needs the list of resources on the server in order to be able to render its basic structure.

The date grouped week/day view is planned for implementation. We hope to get it done for the upcoming SP2 release. If we don't make it in time for it, we'll release it in the following internal builds.

Kind regards,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
SolutionStream
Top achievements
Rank 1
answered on 20 May 2009, 03:05 PM
Ah, perfect!  My resources are now coming in and it is looking great.

My next issue is the session.  It seems that the session used for the other routines is not held in common with the one used for the GetResources call.  Without this similarity, I cannot talk to this portion of the control.

Unless this is a bug, i'm thinking i'll have to populate the resources manually with the control.

Does this sound correct?
0
Accepted
T. Tsonev
Telerik team
answered on 21 May 2009, 01:33 PM
Hi Kier,

I can confirm that the session is not shared between the calling page and the GetResources method. Our research showed that accessing the session data is not possible while the initial request is still executing. So, we had to give up on this one, but we offer another option to send information to the web service.

You can provide your own scheduler info object to pass to the GetResources method. You need to implement ISchedulerInfo first:

public class MySchedulerInfo : SchedulerInfo
{
    private int _userId;

    public int UserId
    {
        get { return _userId; }
        set { _userId = value; }
    }
}

Then you can to handle the ResourcesPopulating event and replace the original schedulerInfo object:

protected void RadScheduler1OnResourcesPopulating(object sender, ResourcesPopulatingEventArgs args)
    {
        MySchedulerInfo info = new MySchedulerInfo();
        info.ViewStart = args.SchedulerInfo.ViewStart;
        info.ViewEnd = args.SchedulerInfo.ViewEnd;
        info.UserId = 100;

        args.SchedulerInfo = info;
    }

Finally, the GetResources method can use the data like this:
    [WebMethod]
    public IEnumerable<ResourceData> GetResources(MySchedulerInfo schedulerInfo)
    {
        int userId = schedulerInfo.UserId;
        // ...

        return Controller.GetResources(schedulerInfo);
    }

I hope this helps.

Sincerely yours,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
SolutionStream
Top achievements
Rank 1
answered on 21 May 2009, 08:08 PM
That was way too easy!

Thanks
Tags
Scheduler
Asked by
SolutionStream
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
SolutionStream
Top achievements
Rank 1
Share this question
or