More in this section

Forums / General Discussions / News calendar control functionality

News calendar control functionality

5 posts, 0 answered
  1. Vangelis
    Vangelis avatar
    153 posts
    Registered:
    07 Jan 2006
    04 Sep 2007
    Link to this post
    Hi,

    I was looking on TIU demo NewsCalendar control and I'm asking how is it possible to have a different functionality.

    What I need is use same control on a page without display articles. As I have noticed there is property NewsCount where it can be set a limitation on articles to display from all (0 - zero) till a specific number. There is no option to display no events below it. What would be the need for this? A visitor would select a specific date and it would be redirected to a newspage (not detailed news page) where this control would be there again with news articles below it. This would solve article paging and archiving since not all articles would be in a single page.

    Single news page would work as it does now.

    If I comment out the 

    <sfNews:NewsList EnableViewState="false" runat="server" ID="newsList" NewsCount="1"></sfNews:NewsList>

    which is below the control then when I press a date which has articles I have the below error only when I press it 2 times.

    Best regards

    Vangelis

    SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.]
       System.Data.SqlTypes.SqlDateTime.FromTimeSpan(TimeSpan value) +613677
       System.Data.SqlTypes.SqlDateTime.FromDateTime(DateTime value) +150
       System.Data.SqlTypes.SqlDateTime..ctor(DateTime value) +13
       System.Data.SqlClient.MetaType.FromDateTime(DateTime dateTime, Byte cb) +56
       System.Data.SqlClient.TdsParser.WriteValue(Object value, MetaType type, Int32 actualLength, Int32 encodingByteSize, Int32 offset, TdsParserStateObject stateObj) +229
       System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj) +3977
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +903
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
       System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
       System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
       System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +9
       Nolics.ORMapper.DataProviders.SQLBlockBuilder.EndStatement(SQLCommandEventArgs args, DataRow row) +395
       Telerik.Cms.Engine.Data.Providers.GCSql2005Builder.EmitGCQuery(StmtContext context, DataRow queryData, Int32 maxRows, String groupName) +1567
       Telerik.Cms.Engine.Data.Providers.GCSql2005Builder.EmitQuery(StmtContext context, DataRow queryData, Int32 maxRows, String groupName) +67
       Nolics.ORMapper.DataProviders.SQLBlockBuilder.ExecuteQuery(StmtContext context, DataRow queryData, Int32 maxRows, String group) +106
       Nolics.ORMapper.DataProviders.SQLDataProvider.ExecQuery(DataSet queries) +496
       Nolics.ORMapper.Base.QueryBase`1.LoadQuery(Int32 maxElements, Int32 fromElement) +275
       Nolics.ORMapper.Base.QueryBase`1.Load(Int32 maxElements, Int32 from) +8
       Telerik.Cms.Engine.Data.Providers.DefaultProvider.LoadQuery(Boolean join, Int32 from, Int32 max, String sortExp, Nullable`1 status, Nullable`1 parentID, IMetaSearchInfo[] filter) +847
       Telerik.Cms.Engine.Data.Providers.DefaultProvider.GetContent(Int32 from, Int32 max, String sortExp, Nullable`1 status, Nullable`1 parentId, IMetaSearchInfo[] filter) +234
       Telerik.Cms.Engine.ContentManager.GetContent(Int32 from, Int32 max, String sortExp, ContentStatus status, IMetaSearchInfo[] filter) +140
       Telerik.News.WebControls.NewsList.CreateChildControls() +964
       System.Web.UI.Control.EnsureChildControls() +87
       System.Web.UI.WebControls.CompositeControl.get_Controls() +12
       Telerik.Cms.Web.InternalPage.ValidateControls(ControlCollection coll) +173
       Telerik.Cms.Web.InternalPage.ValidateControls(ControlCollection coll) +183
       Telerik.Cms.Web.InternalPage.ValidateControls(ControlCollection coll) +183
       Telerik.Cms.Web.InternalPage.ValidateControls(ControlCollection coll) +183
       Telerik.Cms.Web.InternalPage.ValidateControls(ControlCollection coll) +183
       Telerik.Cms.Web.InternalPage.OnPreRender(EventArgs e) +29
       System.Web.UI.Control.PreRenderRecursiveInternal() +77
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.312; ASP.NET Version:2.0.50727.833

  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    05 Sep 2007
    Link to this post
    Hello Vagelis,

    It is not quite clear what you want to achieve and what are the steps for reproducing this. I deleted the NewsList control and commented the unnecessary code in the code behind but can't reproduce the described behavior. Am I missing something?

    I would suggest that you create a new control implementing the new logic instead of modifying an existing one. I think you will find out what's wrong easier this way.

    Hope this is helpful.

    Sincerely yours,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Vangelis
    Vangelis avatar
    153 posts
    Registered:
    07 Jan 2006
    05 Sep 2007
    Link to this post
    Hi Pepi,

    You shouldn't delete all newslist control but comment only the <!-- <sfNews:NewsList EnableViewState="false" runat="server" ID="newsList" NewsCount="1"></sfNews:NewsList> -->

    Also to reproduce the error you should select a date with news items and press twice on this date.

    I can send you an image what I want to do but there is no such option in forums.

    Thanks in advance for your help.

    Vagelis
  4. Sonya
    Sonya avatar
    231 posts
    Registered:
    24 Sep 2012
    10 Sep 2007
    Link to this post
    Hello Vagelis,

    The problem with commenting is that after you apply commenting, the code behind still finds and provides the commented code, and still functions. If you want to exclude it - delete it. 

    Again, you would achieve the functionality you desire with much more success if you created your own control. Don't hesitate to contact us if you meet any problems in the process.  

    Sincerely yours,
    Sonya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Sean
    Sean avatar
    271 posts
    Registered:
    31 May 2006
    10 Sep 2007
    Link to this post
    Hi Vagelis,

    You can in fact comment them out but you need to use Server-side comments instead, the ones you are using are only HTML comments hence why it still finds the controls.

    Cheers
    Sean
Register for webinar
5 posts, 0 answered