AdvancedForm and Data after Postback

23 posts, 1 answers
  1. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 17 Jan 2011 Link to this post

    hi
    I work with the AdvancedForm Excample. I extend it with a Dropdown, with autopostback. After the Postback all Data Fields (Start,end etc.) are empty.

    What can be my mistake?

    Regards Markus

     

  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 17 Jan 2011 Link to this post

    Hi Markus Wenzel,

    I don't think that enabling Autopostback of controls in advanced form is a good solution as there will be flickering.

    Please take a look at the attached project. The textbox in Advanced Form is updated to show the age, when a date of birth is entered. All is done without postback but with RadAjaxManager.

    Please let me know if this was helpful.

    Greetings,
    Veronica Milcheva
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 18 Jan 2011 Link to this post

    Hi
    the Excample dose not run.

    Jscript Fehler

    var j=c($get(i+"_RecurrentAppointment"));
    if(j[0].checked){h.show();
    }j.click(function(){var k=h.parents(".rsAdvancedModal");
    var l={duration:"slow"};
    on Line
    if(j[0].checked){h.show();
    Null Refference Exception

    Regards Markus
  4. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 18 Jan 2011 Link to this post

    Hi
    I had implemented the Excample to my owne Page.
    basicly it work, but if i place the elements to the BasicControlsPanel then i have always the folowing Exeption:
    DotNetNuke.Services.Exceptions.PageLoadException: Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error. ---> System.Web.HttpException: Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error. ---> System.Web.HttpException: Die Steuerelementeauflistung kann nicht geändert werden, da das Steuerelement Codeblöcke enthält (z.B. <% ... %>).
       bei System.Web.UI.ControlCollection.AddAt(Int32 index, Control child)
       bei Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated)
       --- Ende der internen Ausnahmestapelüberwachung ---
       bei Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated)
       bei Telerik.Web.UI.RadAjaxControl.PerformRender()
       bei Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page)
       bei Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page)
       bei System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
       bei System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
       bei System.Web.UI.Page.Render(HtmlTextWriter writer)
       bei DotNetNuke.Framework.PageBase.Render(HtmlTextWriter writer)
       bei System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
       bei System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
       bei System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
       bei System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       --- Ende der internen Ausnahmestapelüberwachung ---

    is it not possible to change the Basic Panel?

    Regardas Markus
  5. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 21 Jan 2011 Link to this post

    Hello
    I have now tried a few things. Your example works already. But if I replace the text box by a RadDateTimePicker, then I get the error:
    System.ArgumentException: The script control "date input " is not a registered script control.

    How can this be done if the goal is to be datumsbox?
    Greetings Markus
  6. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 24 Jan 2011 Link to this post

    Hello Markus Wenzel,

    Please accept my apologies for the late reply.

    Could you please be more specific on which TextBox you are trying to replace and what do you expect the RadDateTimePicker to display.

    Thank you!

    Best wishes,
    Veronica Milcheva
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  7. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 24 Jan 2011 Link to this post

    Hi

    I will replace 

    <

     

     

    asp:TextBox runat="server" ID="txtAge" Width="30px" Enabled="false"></asp:TextBox>

     

    from your Excample.

    The RadDateTimePicker should display the Enddate of the Appointment. I will build a dropdown with severals durations (for Excample 30 min, 1 hour, 2 hour, etc) and on change of the dropdown, the system calculate an new End of the appointment.

    Regards
    Markus
  8. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 27 Jan 2011 Link to this post

    Hi Markus Wenzel,

    I created a sample project to fit your scenario.
    Please take a look at it and let me know if you have further questions.

    Regards,
    Veronica Milcheva
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  9. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 27 Jan 2011 Link to this post

    Hi Veronica

    I have noticed that if you move the Advanced form around the screen a cross between the DIV's appears in the middle of the form?
    Is there any way around this?

    Rgds

    Cush
  10. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 01 Feb 2011 Link to this post

    Hi Darren,

    Unfortunately I was not able the reproduce the issue. Maybe I'm missing something. Could you please send me a video or a screenshot showing the problem?

    Thank you!

    Best wishes,
    Veronica Milcheva
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  11. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 02 Feb 2011 Link to this post

    Hi Veronica

    I have attached the screen shots, this only happens when the advanced screen is dragged with the mouse,
    I created this using your SchedulerCustomAdvancedFormQ1_2010_SP1 example from the website, I have not made any modifications to the code.

    Rgds

    Darren
  12. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 07 Feb 2011 Link to this post

    Hi Cush,

    This is a known issue.
    Please take a look at this sticky forum post for a solution (Q3 2010).  

    Best wishes,
    Veronica Milcheva
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  13. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 09 Feb 2011 Link to this post

    Hi
    I testet your Sample and in a pure Web-Site it works. Did you have a idee why it dose not work in DotNetNuke Module?
    Regards
    Markus
  14. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 09 Feb 2011 Link to this post

    Hello Markus Wenzel,

    Could you please specify the version of DNN that you use? Also could you please send me a live url of the issue. Meantime please check whether your page is in quirks mode.

    Kind regards,
    Veronica Milcheva
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  15. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 09 Feb 2011 Link to this post

    Hi

    I've tried it with version 4.9.3 and 5.2.3. Live link at the moment I can not leave.

    Regards Markus
  16. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 10 Feb 2011 Link to this post

    hi
    i have one additional Remark.

    In DNN, the Advanced Form gos to unvisible after clicking the dropdown. in the normal Web-Site this is not so.

    Regards Markus
  17. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 14 Feb 2011 Link to this post


    Do you use Advanced Templates and is the form modal (<AdvancedForm Modal="true")?


    Kind regards,
    Peter
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  18. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 16 Feb 2011 Link to this post

    Hi
    Yes i do.

    Regards Markus
  19. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 18 Feb 2011 Link to this post


    I guess this is a css issue. If you send us a live url of the problem, we will probably be able to suggest a css fix.

    Regards,
    Peter
    the Telerik team
  20. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 21 Feb 2011 Link to this post

    Hi

    I can give you a Live URL

    http://www.macy-soft.ch/Test.aspx

    then click to one of the names after the green rectangles. Then Open a Popup with the Sheaduler.

    i hope you can find a solution

    Regards
    Markus
  21. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 21 Feb 2011 Link to this post

    Hello Markus,

    I have noticed that the duration combobox causes postback. I suggest you set the end time based on the duration selection client-side and avoid the postback.

    AdvancedForm.ascx
    <br />
                       Duration:
                       <telerik:RadComboBox ID="DurationComboBox" runat="server" AllowCustomText="true"
                           OnClientSelectedIndexChanged="Duration_OnClientSelectedIndexChanged">
                           <Items>                          
                               <telerik:RadComboBoxItem runat="server" Text="30 minutes" Value="30" />
                               <telerik:RadComboBoxItem runat="server" Text="1 hour" Value="60" Selected="true" />
                               <telerik:RadComboBoxItem runat="server" Text="2 hours" Value="120" />
                           </Items>
                       </telerik:RadComboBox>

    AdvancedForm code behind
    protected void Page_Load(object sender, EventArgs e)
            {
                UpdateButton.ValidationGroup = Owner.ValidationGroup;
                UpdateButton.CommandName = Mode == RadSchedulerAdvancedFormAdvancedFormMode.Edit ? "Update" : "Insert";
      
                InitializeStrings();
                InitializeRecurrenceEditor();
      
                if (!FormInitialized)
                {
                    UpdateResetExceptionsVisibility();
                }
                RadComboBoxItem selectedItem =  DurationComboBox.FindItemByValue(Appointment.Duration.TotalMinutes.ToString());
                if (selectedItem != null)
                    DurationComboBox.SelectedValue = Appointment.Duration.TotalMinutes.ToString();
                else
                {
                    RadComboBoxItem newItem = new RadComboBoxItem(Appointment.Duration.TotalHours.ToString() + " hours", Appointment.Duration.TotalMinutes.ToString());
                    DurationComboBox.Items.Insert(0, newItem);
                    DurationComboBox.SelectedIndex = 0;
                }
            }

    AdvancedForm.js
    var endTimePicker = null;
    var startTimePicker = null;
      
      
    * * *
      
     _initializePickers: function () {
            // Show picker pop-ups when the inputs are focused
      
            var showPopupDelegate = Function.createDelegate(this, this._showPopup);
      
            var templateId = this._templateId;
            this._pickers =
            {
                "startDate": $find(templateId + "_StartDate"),
                "endDate": $find(templateId + "_EndDate"),
                "startTime": $find(templateId + "_StartTime"),
                "endTime": $find(templateId + "_EndTime")
            };
      
            endTimePicker = this._pickers.endTime;
            startTimePicker = this._pickers.startTime;
      
    * * *
      
      
    function Duration_OnClientSelectedIndexChanged(sender, args) {
        var endTimeView = endTimePicker.get_timeView();
        var startTimeView = startTimePicker.get_timeView();
        var startTime = startTimeView.getTime();
        if( args.get_item().get_value() != "-")
            endTimeView.setTime(startTime.getHours(),
                                startTime.getMinutes() + parseInt(args.get_item().get_value()),
                                startTime.getSeconds(),
                                startTime);
    }

    Attached is a simple demo for reference.

    All the best,
    Peter
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  22. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 23 Feb 2011 Link to this post

    Hi
    OK, i will try that.

    But what i did not understand is, in the Excample earlier in this thread, it works with the Autopostback. Why not now?

    Regards Markus
  23. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 23 Feb 2011 Link to this post


    I am not sure. In our test environment we don't experience this problem. It could be something DNN specific issue. A client-side approach for this functionality would be better anyway.


    All the best,
    Peter
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top