Forum  Commercial Foru...  Commercial Foru...  how to use the schedulebox
Previous Previous
 
Next Next
New Post 1/16/2012 1:54 PM
  gharnach
8 posts
No Ranking


how to use the schedulebox 

I am having troubles trying to get the schedulebox to work in my project. I am using VS2010, 4.0 .net, and VWG 6.4. I have gone through the schedulebox examples in the companionkit and am confused some. I have dragged the schedulebox control into a form and nothing has happened. I just get an empty box. Is there some sort on initialization needed to get it to work? I am using C#. Can someone provide simple C# code on how the schedulebox is used?

Thanks!!

 
New Post 1/16/2012 3:46 PM
  palli
11824 posts
1st Level Poster




Re: how to use the schedulebox 

Hi gharnach,

Welcome to Visual WebGui

I assume you are referring to designer behaviour only, when you drag and drop a ScheduleBox to your form. If so, then in it's current implementation, ScheduleBox does not have any designer, and what you will see in your designer is an empty box. In addition, even when adding events through designer in the Events collection, those events are not written to the designer generated code, so, the only way to add events to the ScheduleBox is via "manual" coding. This is being addressed in a future release and you can follow our progress on that tracker entry here.

The code necessary to create events and add them to the ScheduleBox can be seen in the CompanionKit's sample on the ScheduleBox. View this link here for instance and scroll down until you see the C# and VB.NET code section and look at the Event.cs source file (or Events.VB if using VB.NET). Simply put, you create an instance of ScheduleBoxEvent and then you add it to the ScheduleBox's Events collection by calling ScheduleBox1.Events.Add(....).

If you didn't know already, then the ScheduleBox is one of the Office suite controls, which mean you will need to add a reference to Gizmox.WebGUI.Forms.Office (and if using "with sources" type of installation, also Gizmox.WebGUI.Forms.Office.Design), and you will also have to register your control in web.config. See more info on control registration here.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 1/18/2012 8:59 AM
  gharnach
8 posts
No Ranking


Re: how to use the schedulebox 
Modified By gharnach  on 1/18/2012 2:05:38 PM)

Hey Pali,

 I have done what you explained. I am still getting an empty schedulebox. I have gone through the companionkit application example in adding an event. I have place the schedulebox called schedulebox1 in a form and here is the code that I am using to add an event:

           ScheduleBoxEvent newEvent = new ScheduleBoxEvent();


            // Create absolutely new event
            newEvent = new ScheduleBoxEvent();
            newEvent.Start = DateTime.Now;
            newEvent.End = newEvent.Start.AddHours(1);
            newEvent.Subject = "This is a test Subject";
            newEvent.Tag = "This is a test tag";
            this.scheduleBox1.Events.Add(newEvent);
            this.scheduleBox1.Show();

 I have placed a border around the schedulebox control in the form. So, the control border shows up in the form while running in debug mode of VS2010, but there isn't any events or day,week or month schedule content showing in the bordered control. Am I still missing something? Also, i have emailed my project to support group.

thanks,

Greg 

 

 
New Post 1/18/2012 12:03 PM
  palli
11824 posts
1st Level Poster




Re: how to use the schedulebox 

Hi Greg,

We received your email to support, but there was no attachment, so I create a sample application based entirely on your code from this post and you can download it here.

I removed the call to this.scheduleBox1.Show() though, as it is not needed.

What I did for this demo project is to create a new Visual WebGui Application Project, reference Gizmox.WebGUI.Forms.Office (and Gizmox.WebGUI.Forms.Office.Design as I'm using a with sources installation), then add a ScheduleBox to the form, added your code to the Load event of the form and finally the ScheduleBox must be registered in web.config.

This works perfectly in this application.

If you still can't get your application to work, them please email it to support and we will take a look.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 1/19/2012 12:13 AM
  JamesC
634 posts
www.redcastle.co.uk
1st Level Poster




Re: how to use the schedulebox 

Hi Greg - see my reply in your other post http://www.visualwebgui.com/Developers/Forums/tabid/364/forumid/-1/threadid/51601/scope/posts/Default.aspx

cheers james

 
Previous Previous
 
Next Next
  Forum  Commercial Foru...  Commercial Foru...  how to use the schedulebox
Azure banner
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS