Problem with GridView 41474

May 30, 2010 at 6:31 AM

Hey Rickard -

Got the site up and running and started to build some pages and ran into more than one issue
The first is a page that has an HTML, NEW-REWRITE, and an EVENT sections

Right now it has text in the HTML a single News item, and one calendar item.
In page view Clicking on the on show past events checkbox causes an unhandled error.

Another Oddity is that the calendar controls on these sections do not obey the default language settings and show the date in DD/MM/YYYY fashion, this can be confusing to users

As soon as I can recreate the problem I had with the NewsTickler I will submit that separately.


 

Server Error in '/' Application.

The GridView 'gvEventList' fired event Sorting which wasn't handled.

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.Web.HttpException: The GridView 'gvEventList' fired event Sorting which wasn't handled.

Source Error:

Line 229:            gvEventList.DataSource = _section.GetEventEntriesReadonly(chkShowPastEvents.Checked);
Line 230:            if (_section.GetEventEntriesReadonly(chkShowPastEvents.Checked).Count>0)
Line 231:                gvEventList.Sort("EventDate", SortDirection.Descending);
Line 232:            gvEventList.DataBind();
Line 233:


Source File: d:\Webs\MWPSK\SectionControls\EventList.ascx.cs    Line: 231

Stack Trace:

[HttpException (0x80004005): The GridView 'gvEventList' fired event Sorting which wasn't handled.]
   System.Web.UI.WebControls.GridView.OnSorting(GridViewSortEventArgs e) +2347649
   System.Web.UI.WebControls.GridView.HandleSort(String sortExpression, SortDirection sortDirection) +88
   SectionControls_EventList.updateViews() in d:\Webs\MWPSK\SectionControls\EventList.ascx.cs:231
   SectionControls_EventList.Page_PreRender(Object sender, EventArgs e) in d:\Webs\MWPSK\SectionControls\EventList.ascx.cs:53
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnPreRender(EventArgs e) +11028046
   System.Web.UI.Control.PreRenderRecursiveInternal() +108
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394
Coordinator
May 31, 2010 at 6:41 AM

Hi bhr.

I am alwost sure that this is caused by the EventList that has a postback for all events. In PageBaseClass you can set EnableViewState to true and test it again.

//Rickard

Jun 1, 2010 at 7:43 PM

Bhr,

 

Did you manage to resolve the issue with the date in event list ? I too have the same issue, it works OK if I hard code the event date in a try catch to something like "31 May 2010" rather than "31/05/2010".

 

 

Jun 2, 2010 at 1:50 AM

I have not tried the solution suggested above, I am more of a user than a coder so I was not sure where to make the recommended changes.