RadDatePicker Inside UpdatePanel -On Popup Message DateInput value disappears

9 posts, 0 answers
  1. License Developer
    License Developer avatar
    12 posts
    Member since:
    Jun 2008

    Posted 12 Apr 2010 Link to this post

    Hi,
    I have a RADDatePicker inside Update Panel.
    I am showing javascript popup message (javascript Confirm message Box with OK/cancel button) on SAVE button Click by using RegisterClientScriptBlock in my .net application.
    When I press SAVE Button Popup message is displayed but the Value in the DatePicker disappears. Once either OK or Cancel button is pressed the DOB again appears in the page.

    If I place DatePicker outside the UpdatePanel it is working fine.
    but I cannot put DatePicker outside the UpdatePanel in my application.

    Please provide the solution ASAP.
    Minakshi
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 12 Apr 2010 Link to this post

    Hello,

     I am unable to replicate the described issue locally. For more information, you can take a look at the attached sample project.

    All the best,

    Maria Ilieva
    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.
  3. License Developer
    License Developer avatar
    12 posts
    Member since:
    Jun 2008

    Posted 13 Apr 2010 Link to this post

    The attached Sample project contains only .sln files. Kindly provide the sample project.
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 13 Apr 2010 Link to this post

    Hi,
     

    Please accept apologizes for my previous post. Find attached the sample project.

    Let me know if further assistance is needed.


    Kind regards,
    Maria Ilieva
    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.
  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 13 Apr 2010 Link to this post

    Hi,
     

    Please accept apologizes for my previous post. Find attached the sample project.

    Let me know if further assistance is needed.


    Kind regards,
    Maria Ilieva
    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.
  6. License Developer
    License Developer avatar
    12 posts
    Member since:
    Jun 2008

    Posted 14 Apr 2010 Link to this post

    Hi Maria,
        Thanks for your quick response.

    The solution which you have provided will not work ( is not working) for my application scenario.
    I want to show popup on some server side condition check. So I have to use RegisterClientScriptBlock (Inline Scripting)

    I have tried using AjaxPanel also Instead of UpdatePanel.
    But not working.

    The scenario (Requirement) is -

    If any duplicate record exists in database then a pop-up message with OK/Cancel would be displayed and if the user selects OK, the entry will be saved.  If the user selects Cancel, the record will not be saved and the current page will remain displayed allowing the user to choose where to go next.

    Following are the steps which i have written in my Code -
    On .ASPX Page -
    I have added a Javascript Function as per below

     

    function CheckDuplicateEntry()

    {

             if(document.getElementById('ctl00_cphContent_hdnValidateDuplicateParent').value == "YES")

             {

     

                 var btn= confirm("Parent records matching this information already exist.Click OK to save the record. Otherwise, click Cancel to stop without saving the record.");

            

             if (btn==true)

                              {

                                document.getElementById('ctl00_cphContent_hdnShouldSaveParent').value="YES";

                               __doPostBack('','');

                             

                              }

                            else

                              {

                               document.getElementById('ctl00_cphContent_hdnShouldSaveParent').value="NO";

                               

                              }

                       

            }

        }

     

     

     

    <asp:UpdatePanel ID="UpnlChild" runat="server" >

    <ContentTemplate>

     

    <telerik:RadDatePicker runat="server" Skin="WebBlue" SkinsPath="~/App_Themes/OFCISBlue/Calendar" height="21px" MinDate = "1/1/1900" RadControlsDir="/" >

     

     

     

    <DateInput Skin="OFCISInput" EnableEmbeddedSkins="False" DateFormat="MM/dd/yyyy" MaxLength=10></DateInput>
    <DatePopupButton HoverImageUrl="~/App_Themes/OFCISBlue/Calendar/WebBlue/Img/datePickerPopupHover.gif" ImageUrl="~/App_Themes/OFCISBlue/Calendar/WebBlue/Img/datePickerPopup.gif" />
    <Calendar runat="server" Skin="WebBlue" ShowRowHeaders="false" SkinsPath="~/App_Themes/OFCISBlue/Calendar" FastNavigationStep="12"> </Calendar>
    <DatePopupButton HoverImageUrl="~/App_Themes/OFCISBlue/Calendar/WebBlue/Img/datePickerPopupHover.gif" ImageUrl="~/App_Themes/OFCISBlue/Calendar/WebBlue/Img/datePickerPopup.gif" />  </telerik:RadDatePicker>
    <asp:Button Text="Save" ID="btnSave" runat="server" Width="70px" />
    </ContentTemplate></asp:UpdatePanel>

    ON .Aspx.Vb Page -
    Inside Save Button Click Event -( On ‘Save Button Click’ Event I have registered a Client Script only if matching records are found in database.)

     

    If (_presenter.CheckForDuplicateEntriesFamily(PFirstName, PMiddleName, PLastName, strDOB, PGenderID, "PARENT") > 0) Then

                                    hdnValidateDuplicateParent.Value = "YES"

     

                                    Dim strbldrQueryString As New StringBuilder

                                    strbldrQueryString.Append("<script language='javascript'> ")

                                    strbldrQueryString.Append("CheckDuplicateEntry()")

                                    strbldrQueryString.Append("</script>")

     

                                    Dim t As Type = Me.[GetType]()

                                    ScriptManager.RegisterClientScriptBlock(Me.Page, t, "DuplicateEntry", strbldrQueryString.ToString.Trim, False)

                                Else

                                    hdnValidateDuplicateParent.Value = "NO"

                                    hdnShouldSaveParent.Value = "YES"

                                End If

     

                                If hdnValidateDuplicateParent.Value = "YES" Then

                                    Exit Sub

                                End If

     

    Everything is working fine with this coding approach,the only problem which we are facing is with Telerik DatePicker. (DateInput Value Disappears)
    Please provide the solution according to  this scenarion and Coding Approach.

    We are using Telerik Version Q1-2008.

    Thanks,
    Minakshi

  7. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 19 Apr 2010 Link to this post

    Hi,

    Will it be convenient for you to open a regular support ticket and send us sample runnable project. We will test it locally and further investigate on your scenario.


    Greetings,
    Maria Ilieva
    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.
  8. License Developer
    License Developer avatar
    12 posts
    Member since:
    Jun 2008

    Posted 19 Apr 2010 Link to this post

    Hi Maria,
        I have attached the Sample runnable project in the support ticket which was submitted earlier by me.

    Thanks,
    Minakshi
  9. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 19 Apr 2010 Link to this post

    Hello License Developer,

    You have addressed your issue as General Feedback type of ticket. Please note that the purpose of the General Feedback type of tickets is for the customers to share their opinion of our products, support, help and etc. and provide suggestions for further improvements.
    The support tickets and forums are used for submitting issues you faced with our controls.
    Therefore, please start a formal support ticket and we will address your questions as necessary.

    Regards,
    Maria Ilieva
    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.
Back to Top