RadDatePicker not showing and throwing errors

2 posts, 0 answers
  1. Tim
    Tim avatar
    8 posts
    Member since:
    May 2015

    Posted 01 Jun 2015 Link to this post

    Hello,

     I'm having problems getting RadDatePicker to work.  It does not show the calendar when I click on the Icon, and the page throws errors when it reloads.

    I'm setting the RadDatePicker with code.  Here are snippets of my code and some error screenshots:

    _________________________________

    <body style="background-color:lightsteelblue;height:100%;margin:0px">
        <form id="frmQuery" runat="server">
        <div>
        <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
            <asp:Timer ID="Timer1" runat="server" Enabled="false"></asp:Timer>
        <table border="0" width="100%">
            <tr>
                <td colspan="2">
                    <center>
                    <table border="0">
                        <tr>
                            <td>
                                <asp:Button ID="btnExport" runat="server" Text="Export" />
                            </td>
                            <td>
                                <asp:Button ID="btnPost" runat="server" Text="Post" />
                            </td>
                            <td>
                                <asp:Button ID="btnGIS" runat="server" Text="GIS" Visible="false" />
                            </td>
                            <td>
                                <asp:Label ID="lblCount" runat="server" Text="Records Showing: 0" style="font-family:Calibri;font-size:8pt;color:cadetblue"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    </center>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <hr />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="pnlFilters" runat="server" style="height:600px;border-right: thin solid white; width:300px">
                    <table border="0">
                        <tr>
                            <td>
                                <center>
                                <asp:Label ID="lblHdr" runat="server" Text="Filters" style="font-family:Calibri;font-size:10pt;color:white"></asp:Label>
                                </center>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Table ID="tblFilters" runat="server"></asp:Table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <center>
                                <asp:Button ID="btnRefresh" runat="server" Text="Refresh" />
                                </center>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblWarning" runat="server" style="font-family:Calibri;font-size:8pt;color:cadetblue" Visible="false" Text=""></asp:Label>
                            </td>
                        </tr>
                     </table>
                     </asp:Panel>
                </td>
                <td>
                    <asp:Panel ID="pnlGrid" runat="server"  Style="height:600px;">
                    <telerik:RadGrid ID="grdResults" OnPageIndexChanged="grdList_PageIndexChanged" OnSortCommand="grdList_SortCommand" OnGroupsChanging="grdResults_GroupsChanging" ShowGroupPanel="true"
                        ShowFooter="true" AllowSorting="True" AllowPaging="True" PageSize="5"  AutoGenerateColumns="False" ShowStatusBar="true" runat="server">
                         <PagerStyle Mode="NumericPages"></PagerStyle>
                        <MasterTableView CommandItemDisplay="Top" DataKeyNames="SalesCode" Name="SalesCodes"> 
                        <CommandItemSettings ShowSaveChangesButton="false" ShowCancelChangesButton="false" ShowRefreshButton="false" ShowAddNewRecordButton="false"/>
                        </MasterTableView>
                    </telerik:RadGrid>
                    <br /><br />
                        <asp:Label ID="lblErrMsg" runat="server" style="font-family:Calibri;font-size:10pt;color:red" Text=""></asp:Label>
                    </asp:Panel>
                </td>
            </tr>

        </table>
        </div>
        </form>
    </body>

    ________________________________________________

                            lbl = New Label
                            lbl.ID = "dmslbl" & Trim(Str(rsCtrl.Item("FieldID")))
                            lbl.Text = rsCtrl.Item("FieldCaption")
                            lbl.Width = 100
                            lbl.CssClass = "hdrText"

    radDate = New RadDatePicker
                            If Not IsDBNull(rsCtrl.Item("FieldDefault")) Then
                                radDate.ID = "dmsdat" & rsCtrl.Item("FieldName") & "|" & rsCtrl.Item("FieldDefault").ToString & "|" & rsCtrl.Item("FieldOperand")
                                Dim dDate As DateTime
                                Select Case rsCtrl.Item("FieldDefault")
                                    Case "TODAY"
                                        radDate.SelectedDate = CDate(FormatDateTime(Now, DateFormat.ShortDate))
                                    Case "MONTHSTART"
                                        dDate = Now
                                        dDate = dDate.AddDays(-(dDate.Day - 1))
                                        radDate.SelectedDate = CDate(FormatDateTime(dDate, DateFormat.ShortDate))
                                    Case "YEARSTART"
                                        dDate = Now
                                        dDate = dDate.AddDays(-(dDate.DayOfYear - 1))
                                        radDate.SelectedDate = CDate(FormatDateTime(dDate, DateFormat.ShortDate))
                                    Case Else
                                        radDate.SelectedDate = rsCtrl.Item("FieldDefault")
                                End Select
                            Else
                                radDate.ID = "dmsdat" & rsCtrl.Item("FieldName") & "||" & rsCtrl.Item("FieldOperand")
                            End If

                            fTbl = New TableRow
                            lblCol = New TableCell
                            lblCol.Controls.Add(lbl)
                            Dim dteCol As New TableCell
                            dteCol.Controls.Add(radDate)
                            fTbl.Cells.Add(lblCol)
                            fTbl.Cells.Add(dteCol)
                            tblFilters.Rows.Add(fTbl)

    __________________________________________________

    Unhandled exception at line 3, column 67270 in http://localhost:49646/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl03_TSM&compress=1&_TSM_CombinedScripts_=;;AjaxControlToolkit,+Version=4.1.60623.0,+Culture=neutral,+PublicKeyToken=28f01b0e84b6d53e:en-US:187c1d17-2715-476f-9eeb-4fd46e2849ea:ea597d4b:b25378d2;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:590e1033-87cd-478b-b29a-dce35b1ad7e0:76254418;Telerik.Web.UI,+Version=2014.3.1209.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:02f074e8-49c0-421d-b27f-4d0b69725ea6:16e4e7cd:f7645509:8674cba1:7c926187:88144a7a:b7778d6c:c08e9f8a:59462f1:a51ee93e:58366029

    0x800a138f - Microsoft JScript runtime error: Unable to set value of the property 'control': object is null or undefined

    ______________________________________________________

  2. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 04 Jun 2015 Link to this post

    Hello Tim,

    There are some steps you may take in order to resolve the issue:

    1. Remove RadCompression from your web.config in case it is enabled:
    http://www.telerik.com/help/aspnet-ajax/compression.html


    2. If you have more code in your real project, make sure that you are not using RadAjaxPanel or RadAjaxManager at the same time. They should not be implemented simultaneously:
    http://www.telerik.com/help/aspnet-ajax/ajax-controls-in-ajaxpanel-and-ajaxsettings.html


    3. If the issue remains, temporarily remove any ajaxification (RadAjaxManager) on the page and enable your script debugger (FireBug or F12) to see whether a more descriptive script or server error will arise. And if it does, you can debug the problematic lines of the application to track down the issue and root it out.

    Hope this helps.

    Regards,
    Eyup
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top