In previous versions of WebDataGrid, if AutoCRUD=false was set, then all the editing could be handled manually. With this current version, the WebDataGrid attempts to lookup all the changed rows by key during a postback even when AutoCRUD=false. If the Grid isn't reloaded at the beginning of the postback or if any of the rows no longer exist an exception occurs: Requested record cannot be found by key. (Infragistics.Web.UI.GridControls.MissingRecordException).
In my web application, the edits are performed first to multiple rows and then the grid is reloaded at the end. Loading it at the beginning too would hurt performance, but the more important problem is that if any of the rows are removed by one user while another user is editing the grid (this is very likely) an exception will occur if the WebDataGrid looks for the missing rows instead of allowing the custom code to handle the updating.
Is there some property other than AutoCRUD that needs to be set for this version to disable the automatic row updating in the WebDataGrid?
I'm having the same trouble as well. Honestly, I can't figure out how to make the grid work properly with a collection. If I do row updating via AutoCRUD the server-side event doesn't allow me to change screen data. If I turn off AutoCRUD and handle the update via an ASP update button then I get the MissingRecordException. What am I missing?
Did you set EnableDataViewState = true?
Is there a definite resolution for this out yet?Here's my scenario, which has been keeping me up for 3 days. I have two Infragistics WebDataGrids on my page.If I select a record in the first grid, it shows a child grid. If i modify any two records in the child grid, and then click outside of the child grid on the parent grid to select a different record, then i get this annoying MissingRecord exception.However if i click on a "Save Child Grid Values" button after modifying records in the child grid, i don't get the error and i'm then able to click on another record in the parent grid.
This is odd, since in both cases a full page post is involved. However only the post from a button causes no error, but a post initiated by an infragistics grid causes the silly exception.I've tried this with AUTOCRUD = TRUE and FALSE, ENABLEVIEWSTATE.... blah blah blah, all the properties mentioned in this post, with no luck.And yes, i do have the latest service release. So PLEASE PLEASE infragistics team, what is the definite solution (if any).
Not sure if this will work for anyone else, seems like a hack. For my situation, I manually clear the actionlist on the client side via javascript just prior to postback.
$find(
'[YOURGRIDNAMEHERE]').get_gridView()._actionList.clear();
This appears to spoof the EditingCore.OnAction to not do anything since there are no actions??
In my scenario, I am attempting to perform Batch add/update/delete on the client side within the grid and then posting the changes back to the server if client hits save, if the client hits cancel, the grid gets reloaded, sometimes with a different datasource, depending on how the client canceled.
No matter what I tried, EditingCore.OnAction was firing and blowing up because I was switching Datasources on the postback and this was occuring before the OnAction method was firing. Once it fired, it threw and exception because the records/datasource it was expecting to be there wasn't...
<igtbl:WebHierarchicalDataGrid ID="UltraWebGrid1" runat="server" DataKeyFields="RcptId" OnInit="InitializeLayout" OnRowAdding="UltraWebGrid1_RowAdding" OnRowUpdating="UltraWebGrid1_RowUpdating" OnInitializeRow="UltraWebGrid1_InitializeRow" OnRowIslandDataBinding="UltraWebGrid1_RowIslandBinding" OnContainerGridDataBinding="UltraWebGrid1_ContainerBinding" OnDataBinding="UltraWebGrid1_DataBinding"
OnLoad="UltraWebGrid1_OnLoad" OnPreRender="UltraWebGrid1_PreRender"
OnUnload="UltraWebGrid1_UnLoad"
AutoGenerateColumns="false" AutoGenerateBands="false" EnableAjax="False" EnableAjaxViewState="False" EnableDataViewState="True" EnableViewState="True" ViewStateMode="Enabled">
.
<
>
/>
="true"
="RowAdded">
="true">
="ToFromEdit"/>
="Single">
I've had the same problem. Solved it by working with buttons and updatepanel and no longer using clientside CRUD. (-> hidden field and postback - datasource + rebinding).
I'm sorry Infrag the clientside thing doesn't work as it should and it's very hard to try to use it !
I've tried the datasourcebinding on the clienside (after searching for 1 day) - very fast but you get problems when trying to perform updates on the serverside.
Then I tried simple autocrud=manual. Seems you have to set the datasource always on the postback when deleting not very practical or logical. -> M A N U A L - I speak Dutch but I thought this meant do it yourself and not by control !!
I'm pretty fed up with it. This is my beaf.