SharePoint 2010 Data Form Web Part can’t render Created Date and throws StackOverflowException

After migrating content database from SharePoint 2007 to SharePoint 2010 one of pages with data form web part gave the following errors: Failed to render Field Created_x0020_Date, use default value instead and Error while executing web part: System.StackOverflowException: Operation caused a stack overflow. Although I found no simple click-and-save solution to problem there’s still way how to solve the issue bu subclassing Data Form Web Part and overriding some properties. Here’s the solution that worked for me.

For me worked overriding some properties of DataFormWebPart like suggested in Microsoft Support article SharePoint 2010: DataForm Web Part displays "Unable to display this Web Part".

[ToolboxItemAttribute(false)]
public class DataFormWebPartFix : DataFormWebPart   {     public override bool IsGhosted     {         get         {             return true;         }     }     public override bool CanHaveServerControls     {         get         {             return true;         }     }
}

Weird thing is the fact that page contains teo data form web parts that both gave the same errors but using extended data form web part only with first of them solved the problem also for another.