I am trying to edit a cell in a master-detail data bound grid. After I edit the cell and step out of it the grid blanks out and I get a big red X across the grid. I also get a dialog which says "There is no Original data to access."
The hierarchy is set up as follows:
this.gridDBMaster1.DataSource = dsAccounts;
this.gridDBMaster1.DataMember = dsAccounts.Tables.TableName ;
// returns the new hierarchy objects
GridHierarchyLevel hlInstruments = this.gridDBMaster1.Binder.RootHierarchyLevel;
GridHierarchyLevel hlPositions = this.gridDBMaster1.Binder.AddRelation("InstrumentToPosition");
Has anyone come across this message? Are hierarchial grids editable?
ADAdministrator Syncfusion Team September 29, 2003 01:36 PM
The message "There is no Original data to access." usually indicates that somehow the grids reference to a related list is somehow out of sync with the underlying tables. The tricky question is why did that happen. Can you provide us with a sample and steps to reproduce the problem so that we debug into it and analyze why that happens? You can open a support incident for this. That would be the easiest.
EBErlly BayueloSeptember 30, 2003 05:30 AM
I debugged the problem further and it is not really related to the master-detail setup. I tried to use the datasource as a single table grid and the problem persisted. I got around the problem by copying the datasource and then attaching it to the grid :
DataSet ds = dsOriginal.Copy()
grid.DataSource = ds
This seems to work even with a master-detail hierarcy setup. Therefore, I think it is not a grid problem but somehow there is something wrong with that particular dataset.
ADAdministrator Syncfusion Team September 30, 2003 07:22 AM
Ok, if it works with a copy of the original object (the dataset) I have the feeling that somehow that original dataset is disposed/closed while the grid still has a reference to it. If that can happen using a copy of the object is a really good idea.