﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>CapableObjects Forums / ECO / General discussions  / "There is no key field defined in the UI component" ? / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>CapableObjects Forums</description><link>http://www.capableobjects.com/apps/InstantForum414/</link><webMaster>forums@capableobjects.com</webMaster><lastBuildDate>Wed, 08 Feb 2012 22:55:23 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: "There is no key field defined in the UI component" ?</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic3117-4-1.aspx</link><description>Uninstalled, reinstalled VS2008 w/all updates - reinstalled ECO5 - FIXED !! &lt;/P&gt;&lt;P&gt;So, I guess my VS was the issue, sigh.</description><pubDate>Thu, 30 Apr 2009 00:08:00 GMT</pubDate><dc:creator>Joe Hendricks</dc:creator></item><item><title>RE: "There is no key field defined in the UI component" ?</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic3117-4-1.aspx</link><description>[quote][b]Jonas Hogstrom (2009-04-28)[/b][hr]Normally the EcoDataSource will be configured so that it adds a key column called "ExternalId", and when you connect a gridview or some other databound control to this datasource, it should set its DataKeyNames property to "ExternalId". If this property is changed to some other value, you will get an exception when you try to perform an update from the component since the Datasource can't tell which row you updated.[/quote]&lt;P&gt;Nothing manually changed at all, ExternalID is there - the second time it happened I was using the default Class1/Attribute1 right after starting a new ECO5 solution w/xml persistence, generating model code, building solution, running xml autoforms.  Edit works fine, but update does not. </description><pubDate>Tue, 28 Apr 2009 15:50:12 GMT</pubDate><dc:creator>Joe Hendricks</dc:creator></item><item><title>RE: "There is no key field defined in the UI component" ?</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic3117-4-1.aspx</link><description>Normally the EcoDataSource will be configured so that it adds a key column called "ExternalId", and when you connect a gridview or some other databound control to this datasource, it should set its DataKeyNames property to "ExternalId". If this property is changed to some other value, you will get an exception when you try to perform an update from the component since the Datasource can't tell which row you updated.</description><pubDate>Tue, 28 Apr 2009 12:05:27 GMT</pubDate><dc:creator>Jonas Hogstrom</dc:creator></item><item><title>RE: "There is no key field defined in the UI component" ?</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic3117-4-1.aspx</link><description>Uninstalled latest field test, reinstalled EcoSetup_5.0.0.3854_2009-03-07_b690, restarted computer.. &lt;/P&gt;&lt;P&gt;Started a new ECO5 asp.net/xml persistence app with Class1/Attribute1 and now get this WEIRD error:&lt;/P&gt;&lt;P&gt;Server Error in '/' Application.&lt;BR&gt;--------------------------------------------------------------------------------&lt;BR&gt;Key must consist of ExternalId only &lt;BR&gt;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. &lt;BR&gt;Exception Details: System.ArgumentException: Key must consist of ExternalId only&lt;BR&gt;Source Error: &lt;BR&gt;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.  &lt;BR&gt;Stack Trace: &lt;BR&gt;[ArgumentException: Key must consist of ExternalId only]&lt;BR&gt;   Eco.Web.UI.WebControls.EcoDataSourceView.GetObject(IDictionary keys) in e:\dev\fbuild\source\Eco\Eco.Web\EcoDataSourceView.cs:869&lt;BR&gt;   Eco.Web.UI.WebControls.EcoDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) in e:\dev\fbuild\source\Eco\Eco.Web\EcoDataSourceView.cs:814&lt;BR&gt;   System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +92&lt;BR&gt;   System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +907&lt;BR&gt;   System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +704&lt;BR&gt;   System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +95&lt;BR&gt;   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37&lt;BR&gt;   System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +123&lt;BR&gt;   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37&lt;BR&gt;   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118&lt;BR&gt;   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135&lt;BR&gt;   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10&lt;BR&gt;   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13&lt;BR&gt;   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175&lt;BR&gt;   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565</description><pubDate>Fri, 24 Apr 2009 04:19:41 GMT</pubDate><dc:creator>Joe Hendricks</dc:creator></item><item><title>"There is no key field defined in the UI component" ?</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic3117-4-1.aspx</link><description>Asp.Net content form with a DataGridView - ExternalID and an AutoInc I added are there.  Let's me Edit a record but I get this when I hit the "Update" grid command column.. ran through QuickStart7(asp.net) and couldn't see any missed steps.  I tried removing the class's associations, regernated model, vallidated model, regenerated db scema(SQLServer2005), rebuilt solution..err still there.  Restarted VS2008 - err still there on update.&lt;/P&gt;&lt;P&gt;Anyone else see this?  Doesn't the EcoDataSource take care of the PK?&lt;/P&gt;&lt;P&gt;[ArgumentException: There is no key field defined in the UI component]&lt;BR&gt;   Eco.Web.UI.WebControls.EcoDataSourceView.GetObject(IDictionary keys) in e:\dev\fbuild\source\Eco\Eco.Web\EcoDataSourceView.cs:868&lt;BR&gt;   Eco.Web.UI.WebControls.EcoDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) in e:\dev\fbuild\source\Eco\Eco.Web\EcoDataSourceView.cs:814&lt;BR&gt;   System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +92&lt;BR&gt;   System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +907&lt;BR&gt;   System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +704&lt;BR&gt;   System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +95&lt;BR&gt;   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37&lt;BR&gt;   System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +123&lt;BR&gt;   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37&lt;BR&gt;   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118&lt;BR&gt;   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135&lt;BR&gt;   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10&lt;BR&gt;   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13&lt;BR&gt;   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175&lt;BR&gt;   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565</description><pubDate>Thu, 23 Apr 2009 23:26:34 GMT</pubDate><dc:creator>Joe Hendricks</dc:creator></item></channel></rss>
