We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Error in GDBGWhithDropGrids Sample

There is an Error in Error in GDBGWhithDropGrids Sample: To do effective the Changes in child grid is necesary to change row, if in the child grid there is not posible to change row and is not posible to do effective the changes in this row. What child grid's Event is necesary to trap to do effective the changes?

2 Replies

AD Administrator Syncfusion Team March 26, 2003 04:45 PM

In general, updating is not supported in that sample because of the required relations that define the displayed tables. For example, you can change the OrderDate in the Orders child table, but you cannot change the CustomerID in the Orders table because that column is used to define the relations. Our upcoming 2.0 release will address this short coming of trying to update child tables from within a hierarchical grid. Fo now, you would have to make the change in the underlying datatable, and then redisplay the grid with the updated information.


AG Alberto Gil Diez March 27, 2003 12:14 AM

Sorry, but changes are allowed in this sample, logically, the columns that are in the relations should not be changed, but this problem can be solved by hiding this columns in the child grid. Now if we change another column and move from one row to another row, the grid contains the new data, but if there is only one row, is not posible change the row and there is no way to do effective this change. The solution to this problem is to capture the child grid hiding event, and I try with Deactivated, Leave and VisibleChanged, but these events are not fired when the child grid hides. Now I've solved this problem by commiting the changes in the child grid before show the child grid from another parent grid row, and before saving changes to the database, but I want to do a Control that automates this, and I'm looking for a more elegant solution of this problem. In this way I have another problem: in the parent grid you can add rows, but is not posible delete rows because there is not a row header column, so I've added to the parent grid a RowHeader column: gbc = New GridBoundColumn() gbc.MappingName = "" gbc.HeaderText = "" gbc.StyleInfo.CellType = "RowHeader" Me.GridBoundColumns.Add(gbc) but this column not show as a rowheader, and not allow select rows and so not allows deleteing rows.

Loader.
Live Chat Icon For mobile
Up arrow icon