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

AdvancedForm and Data after Postback

22 Answers 129 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 2
Markus asked on 17 Jan 2011, 08:27 AM
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

 

22 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 17 Jan 2011, 10:33 AM
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.
0
Markus
Top achievements
Rank 2
answered on 18 Jan 2011, 05:15 PM
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
0
Markus
Top achievements
Rank 2
answered on 18 Jan 2011, 05:50 PM
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
0
Markus
Top achievements
Rank 2
answered on 21 Jan 2011, 05:34 PM
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
0
Veronica
Telerik team
answered on 24 Jan 2011, 08:59 AM
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.
0
Markus
Top achievements
Rank 2
answered on 24 Jan 2011, 09:06 AM
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
0
Veronica
Telerik team
answered on 27 Jan 2011, 12:02 PM
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.
0
Cush
Top achievements
Rank 1
answered on 27 Jan 2011, 09:55 PM
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
0
Veronica
Telerik team
answered on 01 Feb 2011, 11:24 AM
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.
0
Cush
Top achievements
Rank 1
answered on 02 Feb 2011, 10:07 AM
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
0
Veronica
Telerik team
answered on 07 Feb 2011, 10:51 AM
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.
0
Markus
Top achievements
Rank 2
answered on 09 Feb 2011, 06:15 AM
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
0
Veronica
Telerik team
answered on 09 Feb 2011, 09:58 AM
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.
0
Markus
Top achievements
Rank 2
answered on 10 Feb 2011, 05:47 AM
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
0
Markus
Top achievements
Rank 2
answered on 10 Feb 2011, 05:14 PM
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
0
Peter
Telerik team
answered on 14 Feb 2011, 01:04 PM

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.
0
Markus
Top achievements
Rank 2
answered on 16 Feb 2011, 06:27 AM
Hi
Yes i do.

Regards Markus
0
Peter
Telerik team
answered on 18 Feb 2011, 05:38 PM

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
0
Markus
Top achievements
Rank 2
answered on 21 Feb 2011, 07:34 AM
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
0
Peter
Telerik team
answered on 21 Feb 2011, 02:08 PM
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!
0
Markus
Top achievements
Rank 2
answered on 23 Feb 2011, 06:04 AM
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
0
Accepted
Peter
Telerik team
answered on 23 Feb 2011, 01:55 PM

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!
Tags
Scheduler
Asked by
Markus
Top achievements
Rank 2
Answers by
Veronica
Telerik team
Markus
Top achievements
Rank 2
Cush
Top achievements
Rank 1
Peter
Telerik team
Share this question
or