User (Old forums)MemberJune 13, 2007 at 5:16 pmPost count: 23064
I’ve created a master grid that contains a detail grid which contains a detail grid. Initially I have everything collapsed.
I have set up the main grid to use a button in the first column (Edit button) where the cursor moves to the desired column to be edited.
What I would like for it to do though is expand the detail grid and move the cursor to the desired detail cell to be edited.
My onclick event looks like this:
Me.GridControl.CurrentRow = Me.ParentRow
If Me.ParentColumn.FieldName = “Edit” Then
Me.GridControl.CurrentColumn = Me.GridControl.Columns(“Credit”)
If Me.ParentColumn.FieldName = “EditLine” Then
Me.GridControl.DetailGridTemplates(0).DetailGridTemplates(0).Collapsed = False
If Me.ParentColumn.FieldName = “EditResponse” Then
Catch ex As Exception
I can not get the detail grids to expand without using the mouse and clicking the “+” beside the row.
What am I missing?
Imported from legacy forums. Posted by Greg (had 3393 views)User (Old forums)MemberJune 14, 2007 at 2:20 pmPost count: 23064
You are doing it on the template rather than on the actual detail grid. You need to access the detail grid of the master row and expand it.
CType( Me.ParentRow, Xceed.Grid.DataRow ).DetailGrids(0).Expand()
Imported from legacy forums. Posted by André (had 325 views)User (Old forums)MemberJune 18, 2007 at 11:47 amPost count: 23064
Awesome!!! That did the trick. Thank you
Imported from legacy forums. Posted by Greg (had 342 views)User (Old forums)MemberJune 18, 2007 at 5:43 pmPost count: 23064
Since I have 3 SqlDataAdapters filling a single Dataset to produce the Master/Detail/Detail Grids…how can I push any changes back to the database after each change in any of the grids.
I’ve done a few things and it seems like sometimes it will save back to the database then the next time I try the same thing, it won’t.
I’m sure it has something to do with building a handler but I know nothing about doing that at this point.
Imported from legacy forums. Posted by Greg (had 371 views)User (Old forums)MemberJune 19, 2007 at 1:49 pmPost count: 23064
Normally, you need to call Update() on the adapters to update the DB from the DataSet, just as you call Fill() to fill the DataSet from the DB.
You can do this on any event you judge appropriate, for example when the user clicks on a save button, or on the Cell.ValueChanged event if you want to update the DB every time a value changes in a cell.
Imported from legacy forums. Posted by André (had 4404 views)
- You must be logged in to reply to this topic.