Hi, can't seem to get this one working. Here's what I did;1-Loaded the provided sql file and created a mdf file out of it (everything worked fine)2-Attached the mdf file to my project, with working connectionstring, etc.3-Created a blank form with a working sqlDatasource, a webscheduleinfo and finally WebScheduleSqlClientProvider, a webmonthview, all binded together properly of course.
I always get that "provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server". If I switch to a WebScheduleOleDbProvider, it will simply ignore my sqldatasource and work with the default access database. Heck, even with an access datasource, it'll ignore it and work with the default database located in my documents folder.
Needless to say I need to work with a sql mdf file. Please let me know how to make all of this work, I tried all day ! Thanks
Hi,
To wire all the WebSchedule controls including WebMonthView to the SQL database you will need to do followings: You should have WebMonthView and WebScheduleInfo controls on your page.
1. Create a WebSchedule database. To create this database with the table and required StoredProcedures use the WebSchedule2. sql query file which will be located by default during the installation in following directory:
C:\Documents and Settings\All Users\Documents\Infragistics\NetAdvantage for .NET 200[Year] Vol. [Volume Number] CLR XX\WebSchedule\Data
2. Drag and Drop SqlDataSource control to the page and click on the “Configure SqlDataSource” link in the smart tag of the object.
On the "Choose Your Data Connection" wizard step, either create a new connection string that refers to WebSchedule2 database, or use an existing one. Click Next.
On the "Configure the Select Statement" wizard step, select the first radio button with text "Specify a custom SQL statement or stored procedure". Click Next.
On the "Define Custom Statements or Stored Procedures" wizard step, use the SELECT tab and type in ";" in the Sql Statement text. Click on Next. On the "Test Query" wizard step, click on Finish.
3. Drag and drop the WebScheduleSqlClientProvider control and set the DataSourceID to the SqlDataSource.ID and WebScheduleInfoID property to the lone WebScheduleInfo object’s ID.
Once WebScheduleInfo object fetches data with the help of WebScheduleSqlClientProvider, it feeds the activities in the wired WebSchedule controls. The following figure shows you how the WebSchedule controls are connected at a broader level:
(WebMonthView, WebDayView, WebWeekView) <-- WebScheduleInfo <-- WebScheduleSqlClientProvider <-- SqlConnection <-- Sql Server Database
If the page is inside a masterpage we are getting this error. If I remove master page it is working. Interesting
Since the controls are in a master page, all control’s IDs are going to change on a master page or user control. The recommendation is that controls being wired-up by their Ids they should be assigned through code-behind. For example you can use following code:
protected void Page_Load(object sender, EventArgs e)
{
this.WebMonthView1.WebScheduleInfo = this.WebScheduleInfo1;
this.WebScheduleOleDbProvider1.WebScheduleInfo = this.WebScheduleInfo1;
this.WebScheduleOleDbProvider1.Connect(AccessDataSource1.ConnectionString);
}
Hello, can somebody help me. I am facing big trouble here doing the webmonthview work with webscheduleinfo. It is very urgent for me if any body can help me out.
I have done the following thing ....
1. Put the Webmonthview on the page
2. Put the webscheduleinfo on the page
3. put the asp:sqldatasource on the page
4. put the webschedulesqlclientprovider on the page
5. then i initialize the webschedulesqlclientprovider with datasourceid = 'asp:Sqldatasource' id. I just want to show only the single column from this source into the date field of calendar. But it seems it doesn't works. Every time i get a message - isnull function requires two arguments. It becomes a hell like problem for me.
Please help me.
The code on my page is: meetingorganizer.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/LoginMasterPage.master" AutoEventWireup="true" CodeFile="MeetingOrganizer.aspx.cs" Inherits="Default6" CodeFileBaseClass="BaseWebPage" %><%@ Register Assembly="Infragistics35.WebUI.Misc.v9.1, Version=9.1.20091.1015, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %><%@ Register Assembly="Infragistics35.WebUI.WebScheduleDataProvider.v9.1, Version=9.1.20091.1015, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.Data" TagPrefix="ig_scheduledata" %><%@ Register Assembly="Infragistics35.WebUI.WebSchedule.v9.1, Version=9.1.20091.1015, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.WebSchedule" TagPrefix="igsch" %><asp:Content ID="Content2" ContentPlaceHolderID="MasterPlaceHolder1" runat="Server"> <div class="pageTitle"> Meeting Organizer </div> <div style="width: 100%; height: 15px"> <hr class="hrcss" /> </div> <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server"> <igsch:WebMonthView ID="WebMonthView1" runat='server' Width="600px" WeekendDisplayFormat="Full" WebScheduleInfoID="WebScheduleInfo1" AppointmentFormatString="<SUBJECT>"> </igsch:WebMonthView> <igsch:WebScheduleInfo ID="WebScheduleInfo1" runat="server" StyleSetName="" StyleSetPath="" StyleSheetDirectory=""> </igsch:WebScheduleInfo> <ig_scheduledata:WebScheduleSqlClientProvider ID="WebScheduleSqlClientProvider1" runat="server" WebScheduleInfoID="WebScheduleInfo1" UseStoredProcedure="false" DataSourceID="SqlDataSource1"> </ig_scheduledata:WebScheduleSqlClientProvider> <%-- <igsch:WebDayView ID="WebDayView1" runat="server" WebScheduleInfoID="WebScheduleInfo1" EnableAutoActivityDialog="true"> </igsch:WebDayView>--%> </igmisc:WebAsyncRefreshPanel> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SmartClassConnectionString %>" SelectCommand="SELECT 0 [AllDayEvent], dailyvisitentry.[nextaction] [ActivityDescription], 0 [Duration], 'Noida' [Location], dailyvisitentry.ID [ActivityID], dailyvisitentry.[DateVisit][StartDateTimeUtc], dailyvisitentry.[nextaction] [Subject], 0 [EnableReminder], 0 [ReminderInterval], 0 [ShowTimeAs], 0 [Importance], 0 [Status], 0 [RecurrenceID], 0 [VarianceID], [creationdate] [_ts] FROM dailyvisitentry Where [creationdate] between @StartDateTimeUtc and @EndDateTimeUtc UNION ALL Select 0 [AllDayEvent], dve.[nextaction] [ActivityDescription], 0 [Duration], 'Noida' [Location], dve.ID [ActivityID], dve.[DateVisit][StartDateTimeUtc], dve.[nextaction] [Subject], 0 [EnableReminder], 0 [ReminderInterval], 0 [ShowTimeAs], 0 [Importance], 0 [Status], 0 [RecurrenceID], 0 [VarianceID], dve.creationdate [_ts] From schoolmastermarketing join usermaster on schoolmastermarketing.UserID = usermaster.uniqueid join dailyvisitentry as dve on usermaster.uniqueID = dve.createdby Where usermaster.usrid = @OrganizerName And dve.creationdate between @StartDateTimeUtc and @EndDateTimeUtc"> <SelectParameters> <asp:SessionParameter Name="@OrganizerName" SessionField="@OrganizerName" /> <asp:SessionParameter Name="@StartDateTimeUtc" SessionField="@StartDateTimeUtc" /> <asp:SessionParameter Name="@EndDateTimeUtc" SessionField="@EndDateTimeUtc" /> </SelectParameters> </asp:SqlDataSource></asp:Content>
and meetingorganizer.aspx.cs
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Configuration;using System.Data;using Smart_Campus;public partial class Default6 : BaseWebPage{ protected void Page_Load(object sender, EventArgs e) { WebScheduleInfo1.ActiveResourceName = "edu25277"; WebScheduleInfo1.ReminderFormPath = ""; WebScheduleInfo1.AppointmentFormPath = ""; WebScheduleSqlClientProvider1.Connect(System.Configuration.ConfigurationManager.ConnectionStrings["smartclassconnectionstring"].ConnectionString); }}
how should i make it work....can some body please provide me a sample work on this. my email id is er.ankitkhanna@gmail.com
The Sql provider requires certain DB schema to be present. You need to ensure you run the correct SQL scripts shipped with the installation.
For your scenario, what you could use is the WebScheduleGenericDataProvider, which is not bound to specific schema, and lets you configure the Schedule controls without modifying your database.
You can refer to samples and documentation here:
https://es.infragistics.com/samples/aspnet/schedule/overview => ASP.NET (AJAX Enabled) => WebSchedule => GenericDataProvider
and help here:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.2/CLR3.5/html/WebScheduleGenericDataProvider_WebScheduleGenericDataProvider.html
Hope it helps,
Angel
Dear, Thanks for your help.I have applied the source and the functionality is running good. But still i have some problem.
Now i am facing two problems, which are as follows:
1. I have masterpage on my page where i have placed the controls and i am using <asp:LoginStatus> controls to singout and singin, when i click signout button, then first time it does not call the click of signout button and it also changes the master page on the page. When i now click on the signout buttons then it will call the signout function.
2. I have dropdowns on my page when i select any values from dropdown then search on it to bind the calendar with new values, then first time it will not refresh the calendar with new values, i need to click the navigate buttons on the calendar for it to refresh.
How should i solve these problems, please help me.