Created an aspx pageCopied WebSchedule2.mdb to App_Data folder as instructedAdded Access Data SourceConfigured data source - ~/App_Data/WebSchedule2.mdbFollowed all instructions in "Connecting WebSchedule to a Database in Visual Studio 2005"
Followed instructions in "Using the WebSchedule Controls Quick Design"Added WebScheduleInfoAdded WebScheduleOldDbProviderSet DataSourceId to AccessDataSource1Added WebCalendarViewAdded WebDayViewAdded WebMonthViewSet WebScheduleInfoId to WebScheduleInfo1 for all threeOpened WebSchedule2.mdb and added 3 activitiesViewed page in browserClicked on dates where I added activites. Nothing displaysSuddenly I'm getting the following error
Line 13: DataFile="~/App_Data/WebSchedule2.mdb" SelectCommand=";"></asp:AccessDataSource>Line 14: Line 15: <igsch:WebScheduleInfo ID="WebScheduleInfo1" runat="server" Line 16: DataFetch="WebScheduleOleDbProvider1" DataUpdate="WebScheduleOleDbProvider1" Line 17: StyleSetName="" StyleSetPath="" StyleSheetDirectory="">
Sometimes when adding controls it claims there are duplicates when there are no duplicates. Eventually this error goes away.
What am I doing wrong?
Also, are there instructions on how to maintain the WebSchedule2.mdb Access Database? Assuming I get it to work.
Thanks
I'm not sure I was 100% clear with the error I'm getting. Here is additional information.
Error Creating Control - WebScheduleInfo1 Cannot create an object of type 'Infragistics.WebUI.WebSchedule.IDataFetch' from its string representation 'WebScheduleOleDbProvider1' for the 'DataFetch' property.
Thanks, Jim
Also, As soon as I make any type of change I get the following error on everey one of these controls.
"Duplicate Component Name" But when I do a search I don't have any duplicates. Eventually this error goes away, sometimes when I close Visual Studio and open it back up. Very strange.
Hi Steve,
I tried all these ideas and I'm still getting the same errors. I'm sure it must be something obvious that I'm doing wrong but I can't find it.
If you would be kind enough to meet me at the user group meeting on Tuesday, 12/9 maybe we can resolve this and I can stop bothering you.
I can come early if you like so you don't have to stay after work. But whatever time is best for you would be good for me.
Again, thanks for all your help. I'm sorry this has been so difficult.
Jim
Hey Jim,
I will be sticking around next Thursday for the UserGroup meeting so I will be able to take a look at the project then. Can you get here at like 530 so I will have time to take a look at the project befrore the user group starts? That would be great. If not, I will still take a look at it. Then hopefully we will be able to get this problem taken care of once and for all.
Yes, I will be there by 5:30.
And thanks again. Jim
Sorry I missed you but Todd was able to help me. I had a problem with the build number. I think we discussed that before but I forgot to check it when I rebuilt the test application.
I'm down to one last major thing. I have the controls on a maintenance page and also on a view only page so I can update the appointments but anyone logging on can only view the appointment. So far I have not been able to make any of the controls view only.
I also ready somewhere that you can control the view state using the user logon.
Then of course I will have to deal with connecting to the database when I deploy to GoDaddy. But that's for a little later.
I'm still trying. I found another control, WebMonthCalendar. I like it and it has a view only option but I don't see any way to connect it to the database or maintain appointments. But there must be a way if it has view only.
You are probably getting tired of me by now but I’m getting close and don’t want to throw away all my effort and all your help by giving up.
I followed all your instructions and even have ig_res in my project. I have 2 pages, CalendarMaint.aspx (to update the calendar) and CalendarView.aspx (for view only). I only made the changes in CalendarView.aspx and then everywhere else that was not specific to either of those. I checked everything carefully and tested with FireFox, Chrome and IE8.
Both CalendarMaint and CalendarView work the same with all tests.
Here is what I get with Firefox
Get the Reminder popup when I open the page
Click on Open Item
Click on Save and Close
It doesn’t add anything but I get “Transferring data from local host” at the bottom of the popup page but nothing happens, so I close the popup
I then click on a date and it doesn’t open anything
With Chrome
I don’t get the Popup
Click on a date, nothing happens
With IE8
Got this error
Object expected AppointmentAdd.aspx?ReadOnly=true,line27 character 39
Line: 27
Error: Object expected
<body class="FormBackground" onload="AppointmentAddLoad()" style="overflow:hidden;PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px;
When I tested your project
In FireFox and IE8
No popup
Click on a date, popup opens
Save and close, nothing is saved and the popup closes
In Chrome
Nothing happens when I click on a date.
Maybe I still have MasterPage issues?
Ok. There are a few things to go over. I wanted you to handle the ActivityDialogOpening and ReminderDialogOpening ClientSideEvents of the ScheduleInfo control. The properties you are trying to set do not exist.
I attached my sample again so you can see it.
1). Look at the use of the ClientSideEvents of the ScheduleInfo control. This is how you stop the dialog from opening. Just handle the event and call oEvent.cancel = true.
2). Now to make it readonly, I gave you a function inside of the ig_addAppointmentDialogForm.js called DisableElements(); It gets called from the end of the InitializeValues function. Inside of DisableElements, I get all the controls on the page and set them to be disabled.
I inject a little markup into the page that tells me whether or not to disable the elements or not. Here is that line of code.
ClientScript.RegisterClientScriptBlock(this.GetType(), "ReadOnly", "<script>var IsDialogReadOnly=true;</script>");
You can do this however you want. This was just easy for me. I then check for that inside of the InitializeValues function to let me know whether or not I should call my diable function. I use the dialogInterface object which i get for free from using the schedule dialogs to get back to the opener window so I can ge the javascript I injected on that page.
if (dialogInterface._openerWindow.window.IsDialogReadOnly) { DisableElements(); }
Thats it. Now all elements are disabled. Check out the sample. Add an ig_res folder to the project so you have some styling. That folder is too big to attach.
Todd helped me so no problem that you were called away. I should have remembered to fix the build on my own anyway.
The one page I have is ok. I will either not put it in the menu or password protect it or both so only a few people can make updates.
I’m not sure yet for the view only if I will be using several controls such as the WebCalendarView and WebMonthView or some other one in a view only page or just use the WebCalendarView on the home page. I’m going to have 2 sites where I use this and each may want something a little different. But I think either way they should work the same.
I think the cleanest thing would be to not popup the dialog when logging on or opening the view page but just see the control(s) and then be able to click on a day (bolded in the WebCalendarView if there is something there) or a day in the WebMonthView so they can get the popup to see the details but not let them update anything. I suppose it would be nicer not to let them enter anything but disabling the save button would be ok as well if that is easier. Of course they can still click on an empty day as long as they cannot update anything.
I tried adding the ActivityDialogEvent and ReminderDialogOpening and I still get the Reminder popup when opening the page. I would prefer not to have it automatically popup, especially if I have the WebCalendarView on the home page.
Hopefully deploying to GoDaddy and connecting to the database will not be a problem. I’ve done that successfully with SQL Server for a Microsoft control.
My next adventure is to retake C# training to improve my skills so I don't have to ask so many questions.
<td>
<igsch:WebCalendarView ID="WebCalendarView1" runat="server"
WebScheduleInfoID="WebScheduleInfo1"
ActivityDialogEvent="True"
ReminderDialogOpening="True">
</igsch:WebCalendarView>
</td>
<igsch:WebMonthView ID="WebMonthView1" runat="server"
style="top: 0px; left: 0px" WebScheduleInfoID="WebScheduleInfo1"
EnableMultiResourceCaption="True" Height="500px"
MultiDayEventFromArrowCaption="" MultiDayEventToArrowCaption=""
StyleSetName=""
StyleSetPath="" StyleSheetDirectory="" Width="500px"
EnableAutoActivityDialog="False"
</igsch:WebMonthView>
Sorry about Thursday. I had an emergency consulting engagement to attend.
So, the WebMonthCalendar is not the control that you want to use. it is not part of the WebSchedule suite of controls. It is strictly a navigational/picker control. To be with the Schedule Suite, it has to have View on the end of the control name. DayView,WeekView,MonthView, and CalendarView. So, you will still need to use one of those controls.
And for the read only portion, there are many ways to do this. Do you want the dialog to just not open. This would be accomplished by handling the clientside events ActivityDialogOpening and ReminderDialogOpening. You can just return true in there and the dialogs wont open.
If you want to have the dialogs open, you can hide or disable the save button so you will never be able to save anything. This will still let you modify things in the dialog, but you will never be able to save.
Then of course, there is traversing the dom of the page and disabling all the controls on there so you will never be able to change anything.
Either of the last two days will require some custom javascript, but should not be too bad.
Please let me know what approach you would like to take.