I have 3 layer hierarchial grid with inline editing. I use Object datasource and WebHierarchialDataSource as datasource in aspx page. When i edit a cell, i call Row_Updating event to capture the new data. Row_Updating event is being called and looks good. But the grid is being loaded again and my change in the cell is lost. So i added EnableDataViewState="true".. Now i a getting this message on javadscript side.
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Original data source does not support updates.
Please assist.
Hi naveentatineni,
You should make sure your datasource is configured correctly to support CRUD operations, in order to be able to perform them through the grid. Also you should set the DataKeyFields property for each band you want to edit.
Let me know if you have any further questions.
I am strill getting the same error. Below is my datasource that i use to bind to the grid.
<
ig:WebHierarchicalDataSource ID="whdgALMHierDS" runat
="server">
<DataRelations
>
<ig:DataRelation ParentColumns="OWN_HR_LEVEL4_ID" ParentDataViewID="dvOHLvl4" ChildColumns
="OWN_HR_LEVEL4_ID"
ChildDataViewID="dvOHLvl6"
/>
<ig:DataRelation ParentColumns="OWN_HR_LEVEL6_ID" ParentDataViewID="dvOHLvl6" ChildColumns
="OWN_HR_LEVEL6_ID"
ChildDataViewID="dvAsstLvl"
</DataRelations
<DataViews
<ig:DataView ID="dvOHLvl4" DataSourceID="ods1"
<ig:DataView ID="dvOHLvl6" DataSourceID="ods2"
<ig:DataView ID="dvAsstLvl" DataSourceID="ods3"
</DataViews>
</ig:WebHierarchicalDataSource
<br
<asp:ObjectDataSource ID="ods1" runat="server" SelectMethod
="GetOwnerHierarchyHLvl4"
TypeName
="iRiskOnline.BusinessObjects.BOALMHierarchy">
<SelectParameters
<asp:SessionParameter Name="ds" SessionField="sALM_Hierarchies_Filter" Type="Object"
</SelectParameters
<UpdateParameters
<asp:SessionParameter Name="lvl4" SessionField="sALM_Hierarchies_Filter" Type="Object"
</UpdateParameters
</asp:ObjectDataSource
<asp:ObjectDataSource ID="ods2" runat="server" SelectMethod
="GetOwnerHierarchyHLvl6"
<asp:SessionParameter Name="lvl64" SessionField="sALM_Hierarchies_Filter" Type="Object"
<asp:ObjectDataSource ID="ods3" runat="server" SelectMethod="GetAssetLevels" TypeName
And this is the error message that i get.
[Exception]: Original data source does not support updates.
at Infragistics.Web.UI.Framework.Data.DataSourceControlAdapter.Update(Object dataItem, IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)
at Infragistics.Web.UI.Framework.Data.DataSourceObjectView.Update(Object dataItem, IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback)
at Infragistics.Web.UI.GridControls.EditingCore.OnAction(String actionType, Object id, Object value, Object tag)
at Infragistics.Web.UI.GridControls.GridBehavior.Infragistics.Web.UI.GridControls.IGridBehavior.OnAction(String actionType, Object id, Object value, Object tag)
at Infragistics.Web.UI.GridControls.GridBot.LoadAdditionalClientState(Object state)
at Infragistics.Web.UI.GridControls.ContainerGridBot.LoadAdditionalClientState(Object state)
at Infragistics.Web.UI.Framework.RunBot.HandleRaisePostDataChangedEvent()
at Infragistics.Web.UI.GridControls.GridBot.HandleRaisePostDataChangedEvent()
at Infragistics.Web.UI.GridControls.ContainerGrid.RaisePostDataChangedEvent()
at System.Web.UI.Page.RaiseChangedEvents()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
Please let me know how can give the UpdateParameters. An example would be useful.
Did you try to set an UpdateMethod - http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.update(v=vs.100).aspx.
That worked.. Thanks
Hello naveentatineni,
I'm glad you solved your issue.
If there's something else I can help you with, please feel free to contact me.
After overcoming that issue, i had one more question.
I want to add the value of a cell in the Hierarchial Grid Level -2 to UpdateParameters List. How do i do that? What should i use?
Its the issue with the Update Parameters and its fixed now. Thanks for your support.
If you need any further assistance with the matter, please let me know.
Sorry for the late reply.
I'm not sure I understand your question, however I could suggest to look at this article which may help - http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.updateparameters.aspx.