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

Couple problems (Date Range in header and binding controls in advanced forms)

1 Answer 27 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Toni
Top achievements
Rank 1
Toni asked on 25 Apr 2014, 04:20 PM
I am using a Rad Scheduler in Timeline view to view active "appointments" and I have bound controls to NumberOfSlots and SlotDuration. The problem is if I show 4 slots of 1 week each the headers only show the week start (ie 4/25). Is there a way to change the headers to be a little more intuitive, like... 4/25-5/1, 5/2-5/8, 5/9-5/15?
 
My second problem is with trying to create an advanced edit/insert template. I have a combobox inside of a radscheduler and I would like to add a second combobox that selects types (1,2,3,4) and filter the Names combobox based on whether the relational table has an entry of type X and Name Y.

<asp:SqlDataSource runat="server"
        ID="GrabScheduling"
        ConnectionString="<%$ ConnectionStrings:Server %>"
        SelectCommand="GetApt_By_ProjectID"
        SelectCommandType="StoredProcedure"
    >
        <SelectParameters>
            <asp:ControlParameter ControlID="ProjectStatus" Name="pstat" />
        </SelectParameters>
</asp:SqlDataSource>
<Tel:RadGrid runat="server" >
<Tel:RadScheduler runat="server" ID="RadScheduler1" DataSourceID="GrabScheduling"  StartInsertingInAdvancedForm="true" DataKeyField="ID" DataStartField="Start" DataEndField="End" DataSubjectField="CName" CustomAttributeNames="NameID">
    <AdvancedEditTemplate>
        <asp:SqlDataSource runat="server" ID="SelectAvailNames"
                                        ConnectionString="<%$ ConnectionStrings:Server%>"
                                        SelectCommand="Get_Name_Timeslot_Availability"
                                        SelectCommandType="StoredProcedure"
                                        >
                                        <SelectParameters>
                                            <asp:QueryStringParameter QueryStringField="PID" Name="PID" />
                                            <asp:ControlParameter ControlID="startDate" Name="Start" />
                                            <asp:ControlParameter ControlID="endDate" Name="End" />
                                        </SelectParameters>
                                    </asp:SqlDataSource>
                  <Tel:RadComboBox
                                        runat="server"
                                        ID="NameMems"
                                        AllowCustomText="true"
                                        DataSourceID="SelectAvailNames"
                                        DataTextField="Name"
                                        DataValueField="ID"
                                        MarkFirstMatch="true"
                                        SelectedValue='<%# Bind("NameID")%>'
                                    >
                                        <ItemTemplate>
                                            <div<%# If(Eval("AlreadyScheduled"), " style=""background-color: pink;""", "")%>>
                                                <%# Eval("Name")%>
                                            </div>
                                        </ItemTemplate>
                                    </Tel:RadComboBox>
    </AdvancedEditTemplate>
 
</Tel:RadScheduler>


So.... Yeah! This is my first post and I really tried to solve these two before coming here. I really appreciate any help, thanks!

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 30 Apr 2014, 03:29 PM
Hello,

As for your first question I would suggest using jQuery to implement such functionality. The table with class "rsHorizontalHeaderTable" holds each time slot header and that header text is placed in <th> and inside of <div> elementSo simply you can iterate with jQuery through each of those div elements and changes its text to the desired result.

As far as I understand you want to have two related RadComboBox control inside the advanced edit/insert template. Please find here a knowledge base resource that implements this functionality.

Regards,
Boyan Dimitrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Scheduler
Asked by
Toni
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or