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

problem with <AdvancedForm Modal="true" />

2 Answers 89 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Pierre MAUREL
Top achievements
Rank 1
Pierre MAUREL asked on 21 Jun 2010, 04:40 PM
Hi,
I have a problem with my RadScheduler.
The radscheduler displays my AdvancedEditTemplate when I set <AdvancedForm Modal="false" />,
but when I set <AdvancedForm Modal="true" />, nothing happend.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Planning.aspx.cs" Inherits="planning.Planning" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title>Page sans titre</title> 
</head> 
<body> 
    <form id="form1" runat="server"
        <div> 
            <telerik:RadScriptManager  runat="server" ID="RadScriptManager1" /> 
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="RadScheduler1"
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
            <telerik:RadAjaxLoadingPanel  ID="RadAjaxLoadingPanel1" runat="server" /> 
            <telerik:RadScheduler ID="RadScheduler1" runat="server" Culture="French (France)"  
                DataSourceID="SqlDataSourcePlanning" DataEndField="date_fin" DataKeyField="id_planning"  
                DataStartField="date_debut" DataSubjectField="description" GroupBy="Ressource"  
                GroupingDirection="Vertical" ShowViewTabs="False" StartInsertingInAdvancedForm="True"
                <ResourceTypes> 
                    <telerik:ResourceType ForeignKeyField="id_ressource" DataSourceID="SqlDataSourceRessource" 
                        KeyField="id_ressource" Name="Ressource" TextField="ressource" /> 
                </ResourceTypes> 
                <AdvancedForm Modal="true" /> 
                <AdvancedEditTemplate> 
                    <div> 
                        <asp:Label ID="Label1"  AssociatedControlID="TitleTextBox" runat="server">Description</asp:Label> 
                        <asp:TextBox ID="TitleTextBox" Rows="5" Columns="20" runat="server" Text='<%# Bind("Subject") %>' Width="97%" TextMode="MultiLine"></asp:TextBox> 
                    </div> 
                    <div> 
                        <asp:Label ID="Label2" AssociatedControlID="StartInput" runat="server">Start time:</asp:Label> 
                        <telerik:RadDateInput ID="StartInput" SelectedDate='<%# Bind("Start") %>' runat="server"
                        </telerik:RadDateInput> 
                    </div> 
                    <div> 
                        <asp:Label ID="Label3" AssociatedControlID="EndInput" runat="server" CssClass="inline-label">End time:</asp:Label> 
                        <telerik:RadDateInput ID="EndInput" SelectedDate='<%# Bind("End") %>' runat="server"
                        </telerik:RadDateInput> 
                    </div> 
                    <div> 
                         
                    </div> 
                </AdvancedEditTemplate> 
            </telerik:RadScheduler> 
             
            <asp:SqlDataSource ID="SqlDataSourcePlanning" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                SelectCommand="SELECT [tbl_planning].[id_planning], [description], [date_debut], [date_fin], [lnk_planning_ressource].[id_ressource],  
                [lnk_planning_projet].[id_projet], [lnk_planning_role].[id_role], [tbl_projet].[id_couleur], [tbl_projet].[projet], [reccurence_rule], [recurrence_parent_id]  
                FROM [tbl_planning] INNER JOIN [lnk_planning_ressource] ON [lnk_planning_ressource].[id_planning] = [tbl_planning].[id_planning] 
                INNER JOIN [lnk_planning_projet] ON [lnk_planning_projet].[id_planning] = [tbl_planning].[id_planning]  
                INNER JOIN [tbl_projet] ON [lnk_planning_projet].[id_projet] = [tbl_projet].[id_projet]  
                INNER JOIN [lnk_planning_role] ON [lnk_planning_role].[id_planning] = [tbl_planning].[id_planning] 
                WHERE 1=1;"  
                InsertCommand="DECLARE @id_planning int; INSERT INTO [tbl_planning]([description], [date_debut], [date_fin], [reccurence_rule], [recurrence_parent_id], [duree]) VALUES (@description, @date_debut, @date_fin, @reccurence_rule, @recurrence_parent_id, DATEDIFF(mi, @date_debut, @date_fin)); SET @id_planning = @@identity; INSERT INTO [lnk_planning_ressource]([id_planning], [id_ressource]) VALUES (@id_planning, @id_ressource); INSERT INTO [lnk_planning_projet]([id_planning], [id_projet]) VALUES (@id_planning, @id_projet); INSERT INTO [lnk_planning_role]([id_planning], [id_role]) VALUES (@id_planning, @id_role); SELECT @id_planning2 = @id_planning;" 
                UpdateCommand="DELETE FROM [lnk_planning_ressource] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_projet] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_role] WHERE [id_planning] = @id_planning; UPDATE [tbl_planning] SET [description] = @description, [date_debut] = @date_debut, [date_fin] = @date_fin, [reccurence_rule] = @reccurence_rule, [recurrence_parent_id] = @recurrence_parent_id, [duree] = DATEDIFF(mi, @date_debut, @date_fin) WHERE [id_planning] = @id_planning; INSERT INTO [lnk_planning_ressource]([id_planning], [id_ressource]) VALUES (@id_planning, @id_ressource); INSERT INTO [lnk_planning_projet]([id_planning], [id_projet]) VALUES (@id_planning, @id_projet); INSERT INTO [lnk_planning_role]([id_planning], [id_role]) VALUES (@id_planning, @id_role);" 
                DeleteCommand="DELETE FROM [tbl_planning] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_ressource] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_projet] WHERE [id_planning] = @id_planning; DELETE FROM [lnk_planning_role] WHERE [id_planning] = @id_planning;"
                <DeleteParameters> 
                    <asp:Parameter Name="id_planning" Type="Int32" /> 
                </DeleteParameters> 
                <UpdateParameters> 
                    <asp:Parameter Name="description" Type="String" /> 
                    <asp:Parameter Name="date_debut" Type="DateTime" /> 
                    <asp:Parameter Name="date_fin" Type="DateTime" /> 
                    <asp:Parameter Name="id_planning" Type="Int32" /> 
                    <asp:Parameter Name="id_ressource" Type="Int32" /> 
                    <asp:Parameter Name="id_projet" Type="Int32" /> 
                    <asp:Parameter Name="reccurence_rule" Type="String" /> 
                    <asp:Parameter Name="recurrence_parent_id" Type="Int32" />                      
                </UpdateParameters> 
                <InsertParameters> 
                    <asp:Parameter Name="description" Type="String" /> 
                    <asp:Parameter Name="date_debut" Type="DateTime" /> 
                    <asp:Parameter Name="date_fin" Type="DateTime" /> 
                    <asp:Parameter Name="id_ressource" Type="Int32" /> 
                    <asp:Parameter Name="id_projet" Type="Int32" /> 
                    <asp:Parameter Name="id_role" Type="Int32" /> 
                    <asp:Parameter Name="reccurence_rule" Type="String" /> 
                    <asp:Parameter Name="recurrence_parent_id" Type="Int32" />  
                    <asp:Parameter Direction="Output" Name="id_planning2" Type="Int32" />  
                </InsertParameters> 
            </asp:SqlDataSource> 
            <asp:SqlDataSource ID="SqlDataSourceRessource" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                SelectCommand="SELECT [id_ressource], [ressource] FROM [tbl_ressource] WHERE [supprimer]=0"
            </asp:SqlDataSource> 
            <asp:SqlDataSource ID="SqlDataSourceProjet" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                SelectCommand="SELECT [id_projet], [projet], [id_couleur] FROM [tbl_projet] WHERE [supprimer]=0 ORDER BY [projet]"
            </asp:SqlDataSource> 
            <asp:SqlDataSource ID="SqlDataSourceRole" runat="server" ConnectionString="<%$ ConnectionStrings:PLANNING %>" 
                SelectCommand="SELECT [id_role], [role] FROM [ref_role] WHERE [supprimer]=0 ORDER BY [role]" 
                InsertCommand="INSERT INTO [lnk_planning_role] ([id_planning], [id_role]) VALUES (@id_planning, @id_role)"
                <InsertParameters> 
                    <asp:Parameter Name="id_planning" Type="int32" /> 
                    <asp:Parameter Name="id_role" Type="int32" /> 
                </InsertParameters> 
            </asp:SqlDataSource> 
        </div> 
    </form> 
</body> 
</html> 

2 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 24 Jun 2010, 12:10 PM
Hi Pierre,

In order for the advanced template to support the modal mode you need to use the following markup structure as in this example:

<div  class="rsAdvancedEdit" style="position: relative">
    <%-- Title bar. --%>
    <div class="rsAdvTitle">
        <%-- The rsAdvInnerTitle element is used as a drag handle when the form is modal. --%>
        <h1 class="rsAdvInnerTitle">
            TITLE</h1>
<asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose"
CommandName="Cancel" CausesValidation="false" ToolTip='Close'>
            Close
        </asp:LinkButton>
    </div>
    <div class="rsAdvContentWrapper">
        <%-- Scroll container - when the form height exceeds MaximumHeight scrollbars will appear on this element--%>
        <div class="rsAdvOptionsScroll">
        </div>
    </div>
</div>

We'll take care to document this better in the relevant help topics. Apologies for the caused inconvenience.

Kind regards,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Pierre MAUREL
Top achievements
Rank 1
answered on 24 Jun 2010, 01:55 PM
Hi,
I used the advanced template but I have a another problem.
I posted my problem here : http://www.telerik.com/community/forums/aspnet-ajax/scheduler/problem-with-javascript-in-advancedform.aspx
Tags
Scheduler
Asked by
Pierre MAUREL
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Pierre MAUREL
Top achievements
Rank 1
Share this question
or