I'm running into a weird issue with drag and dropping of items in the RadGrid. It turns out in the RowDrop event, the DestinationTableView property of the event args always seems to be returning the MasterTableView, instead of the DetailTableView of the item that I'm dropping the row onto.
Some info on the grid so I don't have to post a gigantic wall of code:
The DestDataItem property is still returning the correct item; it's only the DestinationTableView that's incorrect:
One thought I had was I could work around this by just using e.DestDataItem.OwnerTableView, but that won't work if the row is dropped onto a CommandRow or other non-data row.
Are there some additional troubleshooting steps I could take to diagnose this further?
Thanks.
Some info on the grid so I don't have to post a gigantic wall of code:
- The grid itself is just a two level Master/Detail grid, with the MasterTableView named "PrivilegeCategories" and the only DetailTable named "Privileges".
- Each grid only has two columns- a boundfield named "Name" and a templatefield with edit/cancel buttons.
- The grid is bound in the codebehind using NeedDataSource and DetailTableDataBinding events.
- The MasterTableView has one DataKey named "PrivilegeCategoryID" while the detail table has two, "PrivilegeID,PrivilegeCategoryID"
The DestDataItem property is still returning the correct item; it's only the DestinationTableView that's incorrect:
Debug.Write(e.DestDataItem.OwnerTableView.Name);
// correctly writes "Privileges"
Debug.Write(e.DestinationTableView.Name);
// incorrectly writes "PrivilegeCategories"
One thought I had was I could work around this by just using e.DestDataItem.OwnerTableView, but that won't work if the row is dropped onto a CommandRow or other non-data row.
Are there some additional troubleshooting steps I could take to diagnose this further?
Thanks.