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

Custom Advanced Insert Template With autopostback dropdowns

3 Answers 76 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Bex
Top achievements
Rank 1
Bex asked on 09 Oct 2012, 04:25 PM
Hi

I am trying to create a custom insert template.
When a user adds an appointment they assign it to other users and I am trying to add the ability to narrow down the users via dropdowns within the template.
I have two dropdowns, Organisation and Section, organisation posts back to populate the sections, then when a section is selected it populates a users checkboxlist based on the results.


In the AdvancedControlsPanel I have the following:
<asp:Panel runat="server" ID="AdvancedControlsPanel" CssClass="rsAdvMoreControls">
                        <label>
                            Type:
                        </label>
                        <!--
-->
                 <asp:Panel runat="server" ID="pnlUsers">
                            <label>
                                Users:</label><br />
                            Search for users
                            <asp:DropDownList ID="ddlOrganisation" runat="server" OnSelectedIndexChanged="ddlOrganisation_SelectedIndexChanged"
                                AutoPostBack="true">
                            </asp:DropDownList>
                            Sections
                            <asp:DropDownList ID="ddlSections" runat="server" OnSelectedIndexChanged="ddlSections_SelectedIndexChanged"
                                AutoPostBack="true">
                            </asp:DropDownList>
                            <asp:CheckBoxList runat="server" ID="chkUsers">
                            </asp:CheckBoxList>
                        </asp:Panel>
                        <asp:Panel runat="server" ID="ResourceControls">
                        </asp:Panel>
                    </asp:Panel>


When the postback happend all the rest of the controls in the insert window blanked so I tried putting these in an ajaxpanel and registering it with the scriptmanager as it was saying it needed registering when the dropdown did the autopostback.
I did this on the advanced form page load like so 
sm1.RegisterScriptControl(ajaxpnl);

but I got an error saying
script controls may not be registered before PreRender


I also tried using a ajaxmanager proxy against the dropdowns but this just seemed to replicate the controls down the page.

My main page has a RadAJaxManager on it and the radscheduler is ajaxified.

Is there any examples anywhere of how I can get this to work?
I know its a problem with my ajax but I can't get my head round it! 

Bex



3 Answers, 1 is accepted

Sort by
0
Bex
Top achievements
Rank 1
answered on 10 Oct 2012, 10:55 AM
Having dug around a bit more I can see my problem isn't as simple as it appeared.
I have ran the examples and added my code standalone and it all works. It is something to do with the way I have everything set up.
I plan on compiling it all in a small project and creating a support ticket.
0
Kate
Telerik team
answered on 12 Oct 2012, 06:00 AM
Hi Becky,

Please take your time. We will be happy to help you once we have the runnable project that we can inspect locally.

Kind regards,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Steve
Top achievements
Rank 1
answered on 12 Oct 2012, 07:32 AM
The support ticket has been submitted!
Tags
Scheduler
Asked by
Bex
Top achievements
Rank 1
Answers by
Bex
Top achievements
Rank 1
Kate
Telerik team
Steve
Top achievements
Rank 1
Share this question
or