This question is locked. New answers and comments are not allowed.
We have a strange error, not sure if its related to OpenAccess or Radgrid/Radeditor.
This is the code:
Insert and Update in MasterTableView works fine
Insert and Update in Detailview works fine too, as long the text in the
As soon we want to edit or insert a long html code, we get that strange error:
strange, as we cant see why this have to do with a object key, as the same row edit or insert works, with a smaller text
We use openaccess free version and are evaluating the UI controls
Tks
Daniel
This is the code:
<telerik:OpenAccessLinqDataSource ID="dsPages" runat="server" ContextTypeName="carcompete.ef.EntitiesModel" EnableDelete="True" EnableInsert="True" EnableUpdate="True" EntityTypeName="" OrderBy="Name" ResourceSetName="Pages"> </telerik:OpenAccessLinqDataSource> <telerik:OpenAccessLinqDataSource ID="OpenAccessDataSource2" Runat="server" ContextTypeName="carcompete.ef.EntitiesModel" EnableDelete="True" EnableInsert="True" EnableUpdate="True" EntityTypeName="" ResourceSetName="Contents" Where="Pages_PageId == @PageId"> <WhereParameters> <asp:Parameter Name="PageId" Type="Int32" /> </WhereParameters> </telerik:OpenAccessLinqDataSource> <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="dsPages" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" CellSpacing="0" GridLines="None" Skin="MetroTouch"> <HeaderContextMenu> <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> </HeaderContextMenu> <MasterTableView AutoGenerateColumns="False" DataKeyNames="PageId" DataSourceID="dsPages" CommandItemDisplay="TopAndBottom"> <DetailTables> <telerik:GridTableView runat="server" CommandItemDisplay="TopAndBottom" EditMode="PopUp" DataSourceID="OpenAccessDataSource2" DataKeyNames="ContentId" AutoGenerateColumns="False" AllowAutomaticDeletes="True" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" > <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="PageId" MasterKeyField="PageId" /> </ParentTableRelation> <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn> <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="ContentId" DataType="System.Int32" FilterControlAltText="Filter ContentId column" HeaderText="ContentId" ReadOnly="True" SortExpression="ContentId" UniqueName="ContentId"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Pages_PageId" FilterControlAltText="Filter Pages_PageId column" HeaderText="Pages_PageId" SortExpression="Pages_PageId" UniqueName="Pages_PageId"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Position" FilterControlAltText="Filter Position column" HeaderText="Position" SortExpression="Position" UniqueName="Position"> </telerik:GridBoundColumn> <telerik:GridHTMLEditorColumn DataField="Html" FilterControlAltText="Filter Html column" HeaderText="Html" SortExpression="Html" UniqueName="Html"> </telerik:GridHTMLEditorColumn> </Columns> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn> </EditFormSettings> </telerik:GridTableView> </DetailTables> <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn Visible="True"> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="PageId" DataType="System.Int32" FilterControlAltText="Filter PageId column" HeaderText="PageId" ReadOnly="True" SortExpression="PageId" UniqueName="PageId"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column" HeaderText="Name" SortExpression="Name" UniqueName="Name"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Leftclass" FilterControlAltText="Filter Leftclass column" HeaderText="Leftclass" SortExpression="Leftclass" UniqueName="Leftclass"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Rightclass" FilterControlAltText="Filter Rightclass column" HeaderText="Rightclass" SortExpression="Rightclass" UniqueName="Rightclass"> </telerik:GridBoundColumn> </Columns> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn> </EditFormSettings> </MasterTableView> <FilterMenu> <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> </FilterMenu> </telerik:RadGrid>Insert and Update in MasterTableView works fine
Insert and Update in Detailview works fine too, as long the text in the
telerik:GridHTMLEditorColumn is not long.As soon we want to edit or insert a long html code, we get that strange error:
The database version of the object identified by the specified key is newer than the version specified in the key.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: Telerik.OpenAccess.Exceptions.OptimisticVerificationException: The database version of the object identified by the specified key is newer than the version specified in the key.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: [OptimisticVerificationException: The database version of the object identified by the specified key is newer than the version specified in the key.] OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.GetObjectByKey(ObjectKey key) +240 OpenAccessRuntime.DataObjects.UnsynchronizedPMProxy.GetObjectByKey(ObjectKey key) +55 OpenAccessRuntime.ObjectScope.GetObjectByKey(ObjectKey key) +55 Telerik.OpenAccess.OpenAccessContextBase.GetObjectByKey(ObjectKey key) +255 Telerik.OpenAccess.Web.OpenAccessLinqDataSourceView.GetObjectByKeys(IDictionary keys) +143 Telerik.OpenAccess.Web.OpenAccessLinqDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +192 System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +87 Telerik.Web.UI.GridTableView.PerformUpdate(GridEditableItem editedItem, Boolean suppressRebind) +381 Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +2002 Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +211 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +71 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 Telerik.Web.UI.GridEditFormItem.OnBubbleEvent(Object source, EventArgs e) +372 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +121 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +156 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9642898 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724strange, as we cant see why this have to do with a object key, as the same row edit or insert works, with a smaller text
We use openaccess free version and are evaluating the UI controls
Tks
Daniel