Dear Telerik Users
I'm having a problem with drag and drop functionality in a hierarchical Gridview.
As I drag rows and drop them on top of another row, the underlying (datasource-bound) datatable-entries get updated (Datarow["ParentId"] = dropCell["ParentId"].
This means, that after dragging, the entries appear under another parent in hierarchy. The gridview has to reflect these changes in the underlying database by adjusting the size of the expanded hierarchy-grid.
Even thought in general it's working, but there are a lot of incoherencies,
- expand/collapse is running out of sync
- parents with children sometimes cannot be expanded
- the children of the last row in the mastertemplate never shows the children even though expanded (children are "hidden")
closing and reopening the gridview solves the out-of-sync issues until I restart drag and dropping + expanding and collapsing
Question:
What is the "official way" of keeping the underlying datatables and the visual elements syncronized?
I've tried:
1. Datatable.AcceptChanges()
2. DataRow.BeginEdit() - EndEdit()
3. dropTemplate.Update(GridUINotifyAction.... ==> every action)
4. RadGridView.Update() RadGridview.Refresh()
The only effect I've noticed is that the "GridUINotifyAction.AddRows" seems to adapt the size of the expanding parent.
Sorry, maybe it's a trival mistake, but I do not see it and I'm almost there...
Thank you.
Markus