User Profile & Activity

Way Hang Wee Member
Page
of 6
Posted: January 27, 2010 12:44 AM

Attached is a simple sample i did.

After i selected record in WebCombo1 & WebCombo2, then i click the AutoPostBack button.

In Page_Load event, i'm not able to get WebCombo2.SelectedRow.Value.

Pls advise.

It works now.

Thanks!

Posted: January 21, 2010 5:32 AM

I managed to bind my WebScheduler to ISDataSource already. But there's a problem. The WebScheduler only show event stored in Events table but not RecurringEvents table. Below is the code where i bind WebScheduler to ISDataSource:

<ISWebScheduler:WebScheduler ID="wsSchedule" runat="server" Height="600px" Width="800px" EventsDataMember="ttEvents" ResourcesDataMember="ttResources" CategoriesDataMember="ttCategories" RecurrenceDataMember="ttRecurrenceInfo" RecurringEventsDataMember="ttRecurringEvents" EnableExport="True" IncludeSplitViewInMenu="True" EnableMultipleCellSelection="true" DataSourceID="ISDSSchedule"> <DefaultResource ResourceColor="#D96666" ResourceName="Default"></DefaultResource> <DataBinding> <ResourcesBinding DescriptionField="Description" LocationField="Location" ResourceColorField="ResourceColor" ResourceIDField="ID" ResourceNameField="StaffName" /> <EventsBinding AllDayEventField="AllDayEvent" CategoryIDField="CategoryID" DescriptionField="Description" EndTimeField="EndTime" EventIDField="ID" LocationField="RoomID" ModeField="Mode" ResourceIDField="StaffID" StartTimeField="StartTime" SubjectField="ActivityCode" ReminderTimeSpanField="ReminderTimespan" /> <RecurringEventsBinding AllDayEventField="AllDayEvent" CategoryIDField="CategoryID" ReminderTimeSpanField="ReminderTimeSpan" DescriptionField="Description" EndTimeField="EndTime" EventIDField="ID" ExceptionDateField="ExceptionDate" ExceptionInfoField="ExceptionInfo" LocationField="RoomID" ModeField="Mode" ParentIDField="ParentID" RecurrenceIDField="RecurrenceID" ResourceIDField="StaffID" StartTimeField="StartTime" SubjectField="ActivityCode" /> <RecurrenceBinding EndDateField="EndDate" ModeField="Mode" NDayField="NDay" NMonthField="NMonth" NWeekField="NWeek" NYearField="NYear" RangeModeField="RangeMode" RecurrenceIDField="ID" StartDateField="StartDate" TotalRecurrencesField="TotalRecurrence" WeekDaysField="WeekDay" /> </DataBinding> <ViewSettings SelectedViewMode="Week"> <QuarterView Enabled="True" /> <TimelineView Enabled="True" NumberOfDays="7" /> </ViewSettings> <DataEditing AllowAdd="Yes" AllowEdit="Yes" AllowDelete="Yes" AllowMove="Yes" AllowResize="Yes" /> <CalendarSettings NumberOfMonthDisplayed="1" /> </ISWebScheduler:WebScheduler> <isdatasource:isdatasource runat="server" ID="ISDSSchedule" SchemaName="Optimizer.dsSchedule"> <tables> <ISDataSource:ISDataSourceTable DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TableName="ttCategories" TypeName="Optimizer.dsScheduleTableAdapters.ttCategoriesTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_ID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="CategoryName" Type="String" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="CategoryColor" Type="String" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="CategoryName" Type="String" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="CategoryColor" Type="String" /> <asp:Parameter Name="Original_ID" Type="Int32" /> </UpdateParameters> </ISDataSource:ISDataSourceTable> <ISDataSource:ISDataSourceTable DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TableName="ttEvents" TypeName="Optimizer.dsScheduleTableAdapters.ttEventsTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_ID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="StaffID" Type="Int32" /> <asp:Parameter Name="ActivityCode" Type="String" /> <asp:Parameter Name="RoomID" Type="Int32" /> <asp:Parameter Name="StartTime" Type="DateTime" /> <asp:Parameter Name="EndTime" Type="DateTime" /> <asp:Parameter Name="IsLong" Type="Boolean" /> <asp:Parameter Name="ScheduleID" Type="Int32" /> <asp:Parameter Name="CategoryID" Type="Int32" /> <asp:Parameter Name="Mode" Type="Int32" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="AllDayEvent" Type="Boolean" /> <asp:Parameter Name="ReminderTimeSpan" Type="Int32" /> <asp:Parameter Name="ReminderDismiss" Type="Int32" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="StaffID" Type="Int32" /> <asp:Parameter Name="ActivityCode" Type="String" /> <asp:Parameter Name="RoomID" Type="Int32" /> <asp:Parameter Name="StartTime" Type="DateTime" /> <asp:Parameter Name="EndTime" Type="DateTime" /> <asp:Parameter Name="IsLong" Type="Boolean" /> <asp:Parameter Name="ScheduleID" Type="Int32" /> <asp:Parameter Name="CategoryID" Type="Int32" /> <asp:Parameter Name="Mode" Type="Int32" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="AllDayEvent" Type="Boolean" /> <asp:Parameter Name="ReminderTimeSpan" Type="Int32" /> <asp:Parameter Name="ReminderDismiss" Type="Int32" /> <asp:Parameter Name="Original_ID" Type="Int32" /> </UpdateParameters> </ISDataSource:ISDataSourceTable> <ISDataSource:ISDataSourceTable DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TableName="ttRecurrenceInfo" TypeName="Optimizer.dsScheduleTableAdapters.ttRecurrenceInfoTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_ID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="StartDate" Type="DateTime" /> <asp:Parameter Name="EndDate" Type="DateTime" /> <asp:Parameter Name="TotalRecurrence" Type="Int32" /> <asp:Parameter Name="WeekDay" Type="String" /> <asp:Parameter Name="ScheduleID" Type="Int32" /> <asp:Parameter Name="Mode" Type="Int32" /> <asp:Parameter Name="RangeMode" Type="Int32" /> <asp:Parameter Name="NDay" Type="Int32" /> <asp:Parameter Name="NWeek" Type="Int32" /> <asp:Parameter Name="NMonth" Type="Int32" /> <asp:Parameter Name="NYear" Type="Int32" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="StartDate" Type="DateTime" /> <asp:Parameter Name="EndDate" Type="DateTime" /> <asp:Parameter Name="TotalRecurrence" Type="Int32" /> <asp:Parameter Name="WeekDay" Type="String" /> <asp:Parameter Name="ScheduleID" Type="Int32" /> <asp:Parameter Name="Mode" Type="Int32" /> <asp:Parameter Name="RangeMode" Type="Int32" /> <asp:Parameter Name="NDay" Type="Int32" /> <asp:Parameter Name="NWeek" Type="Int32" /> <asp:Parameter Name="NMonth" Type="Int32" /> <asp:Parameter Name="NYear" Type="Int32" /> <asp:Parameter Name="Original_ID" Type="Int32" /> </UpdateParameters> </ISDataSource:ISDataSourceTable> <ISDataSource:ISDataSourceTable DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TableName="ttRecurringEvents" TypeName="Optimizer.dsScheduleTableAdapters.ttRecurringEventsTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_ID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="RecurrenceID" Type="Int32" /> <asp:Parameter Name="StaffID" Type="Int32" /> <asp:Parameter Name="ActivityCode" Type="String" /> <asp:Parameter Name="RoomID" Type="Int32" /> <asp:Parameter Name="ScheduleID" Type="Int32" /> <asp:Parameter Name="ParentID" Type="Int32" /> <asp:Parameter Name="StartTime" Type="DateTime" /> <asp:Parameter Name="EndTime" Type="DateTime" /> <asp:Parameter Name="CategoryID" Type="Int32" /> <asp:Parameter Name="Mode" Type="Int32" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="AllDayEvent" Type="Boolean" /> <asp:Parameter Name="ExceptionDate" Type="DateTime" /> <asp:Parameter Name="ExceptionInfo" Type="String" /> <asp:Parameter Name="ReminderTimeSpan" Type="Int32" /> <asp:Parameter Name="ReminderDismiss" Type="Boolean" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="RecurrenceID" Type="Int32" /> <asp:Parameter Name="StaffID" Type="Int32" /> <asp:Parameter Name="ActivityCode" Type="String" /> <asp:Parameter Name="RoomID" Type="Int32" /> <asp:Parameter Name="ScheduleID" Type="Int32" /> <asp:Parameter Name="ParentID" Type="Int32" /> <asp:Parameter Name="StartTime" Type="DateTime" /> <asp:Parameter Name="EndTime" Type="DateTime" /> <asp:Parameter Name="CategoryID" Type="Int32" /> <asp:Parameter Name="Mode" Type="Int32" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="AllDayEvent" Type="Boolean" /> <asp:Parameter Name="ExceptionDate" Type="DateTime" /> <asp:Parameter Name="ExceptionInfo" Type="String" /> <asp:Parameter Name="ReminderTimeSpan" Type="Int32" /> <asp:Parameter Name="ReminderDismiss" Type="Boolean" /> <asp:Parameter Name="Original_ID" Type="Int32" /> </UpdateParameters> </ISDataSource:ISDataSourceTable> <ISDataSource:ISDataSourceTable DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TableName="ttResources" TypeName="Optimizer.dsScheduleTableAdapters.ttResourcesTableAdapter" UpdateMethod="Update"> <DeleteParameters> <asp:Parameter Name="Original_ID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="StaffCode" Type="String" /> <asp:Parameter Name="StaffName" Type="String" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="Location" Type="String" /> <asp:Parameter Name="ResourceColor" Type="String" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="StaffCode" Type="String" /> <asp:Parameter Name="StaffName" Type="String" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="Location" Type="String" /> <asp:Parameter Name="ResourceColor" Type="String" /> <asp:Parameter Name="Original_ID" Type="Int32" /> </UpdateParameters> </ISDataSource:ISDataSourceTable> </tables> </isdatasource:isdatasource>

 

Any idea?

Thanks!

Posted: January 20, 2010 4:56 AM

Attached is the simple WebApplication project which the dataset is not listed in the ISDataSource configure data source wizard.

When i create the same thing but using WebSite, then the dataset do appear.

Pls advise.

Thanks!

Posted: January 20, 2010 2:12 AM

Hi,

I have some issue with ISDataSource.

1) I create a new WebApplication project.

2) I create App_Code folder.

3) I create new dataset inside App_Code folder.

4) I drag & drop ISDataSource into aspx file.

5) I configure ISDataSource through wizard, but i can't c the dataset in the list.

 

The problem doesn't exist when i create WebSite project.

Pls advise.

Thanks!

hI,

i tried the code in WebTreeView sample project & it doesn't work either. Attached is the aspx file i make changes to GetCheckedNodes example.

Pls advise.

Thanks!

Hi,

Attached is the error i hit when i make use of your code.

I hit the error when i check on any node of the WebTreeView.

Pls advise.

Thanks!

Hi Handy,

I can get the checked nodes on client side event. But when i tried to save the checked nodes into hidden input (asp.net label control), it seems like i'm not able to save it. Can you show me how to do it?

Thanks!

Posted: January 18, 2010 2:37 AM

Before that, i need to bind my WebScheduler to ISDataSource rite? Below is my code for WebScheduler and ISDataSource in my aspx file:

<ISWebScheduler:WebScheduler ID="wsSchedule" runat="server" Height="600px" Width="800px" DataSourceID="ISDSSchedule" EventsDataMember="ttEvents" EnableExport="True" IncludeSplitViewInMenu="True" EnableMultipleCellSelection="true"> <DefaultResource ResourceColor="#D96666" ResourceName="Default"></DefaultResource> <DataBinding> <EventsBinding AllDayEventField="AllDayEvent" CategoryIDField="CategoryID" DescriptionField="Description" EndTimeField="EndTime" EventIDField="ID" LocationField="RoomID" ModeField="Mode" ResourceIDField="StaffCode" StartTimeField="StartTime" SubjectField="ActivityCode" ReminderTimeSpanField="ReminderTimespan" /> </DataBinding> <ViewSettings SelectedViewMode="Week"> <QuarterView Enabled="True" /> <TimelineView Enabled="True" NumberOfDays="7" /> </ViewSettings> <DataEditing AllowAdd="Yes" AllowEdit="Yes" AllowDelete="Yes" AllowMove="Yes" AllowResize="Yes" /> <CalendarSettings NumberOfMonthDisplayed="1" /> </ISWebScheduler:WebScheduler> <ISDataSource:ISDataSource ID="ISDSSchedule" runat="server" SchemaName="dsSchedule"> <Tables> <ISDataSource:ISDataSourceTable ConflictDetection="CompareAllValues" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="Original_{0}" SelectMethod="GetData" TableName="ttEvents" TypeName="dsScheduleTableAdapters.ttEventsTableAdapter" UpdateMethod="Update"> <InsertParameters> <asp:Parameter Name="EventID" Type="Int32" /> <asp:Parameter Name="CategoryID" Type="String" /> <asp:Parameter Name="Mode" Type="Int32" /> <asp:Parameter Name="ActivityCode" Type="String" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="RoomID" Type="String" /> <asp:Parameter Name="AllDayEvent" Type="Boolean" /> <asp:Parameter Name="StartTime" Type="DateTime" /> <asp:Parameter Name="EndTime" Type="DateTime" /> <asp:Parameter Name="ReminderTimespan" Type="Int32" /> <asp:Parameter Name="ReminderDismiss" Type="Boolean" /> </InsertParameters> </ISDataSource:ISDataSourceTable> </Tables> </ISDataSource:ISDataSource>

 

While in dsSchedule_Extended.vb, i have code as below:

Imports Microsoft.VisualBasic

Microsoft.VisualBasic

Imports System

System

Namespace dsScheduleTableAdapters

dsScheduleTableAdaptersPublic Partial Class ttEventsTableAdapterInherits Global.System.ComponentModel.Component<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, False)> _Public Overloads Function Insert(ByVal EventID As Integer, ByVal CategoryID As String, ByVal StaffCode As Global.System.Nullable(Of Integer), ByVal Mode As Global.System.Nullable(Of Integer), ByVal ActivityCode As String, ByVal Description As String, ByVal RoomID As String, ByVal AllDayEvent As Boolean, ByVal StartTime As Global.System.Nullable(Of Date), ByVal EndTime As Global.System.Nullable(Of Date), ByVal ReminderTimespan As Global.System.Nullable(Of Integer), ByVal ReminderDismiss As Boolean) As Integer Me.Connection.Open()Dim i As Integer = 0Try Me.Insert(EventID, CategoryID, StaffCode, Mode, ActivityCode, Description, RoomID, AllDayEvent, StartTime, EndTime, ReminderTimespan, ReminderDismiss)Me.Adapter.InsertCommand.CommandText = "SELECT @@IDENTITY" Return CInt(Fix(Me.Adapter.InsertCommand.ExecuteScalar()))Finally Me.Connection.Close()End Try End Function End Class End Namespace  

I compiled without error, but when i run it, i'll hit error as in attachment.

What do i miss out?

Posted: January 15, 2010 3:56 AM

If make use of dataset, i'll need to set the connection to database during design time.

For my case, i need to connect to different database based on user login.

How can i make my WebScheduler connect to different database dynamically during run time?

Thanks!

All times are GMT -5. The time now is 5:38 AM.
Previous Next