Just upgraded to 2009 Q1 from 2008 Q3 and I'm having a weird problem.
I have an embedded RadGrid in a Radgrid (let's call them rdParent and rdChild for this post) and both have DragandDrop enabled but you cannot drag to each other (you cannot drag and drop from rdParent to rdChild and vice versa). There's a 3rd Radgrid that you can drag and drop to rdParent or rdChild, let's call this one rdCousin.
The scenario is both rdParent and rdChild are empty when you start and rdCousing is populated, you can then drag and drop from rdCousin to either rdParent or rdChild. You can put back rows from rdParent and rdChild to rdCousin.
When I move rows from rdCousing to rdChild or rdCousin to rdParent everything works great, if I move rows from rdParent to rdCousin it works great.
When I move rows from rdChild to rdCousin it doesn work, this worked in 2008 Q3 but doesn't work in 2009 Q1 anymore.
After looking at what is going on here's what I've found and what is weird:
rdChild is firing the rdParent rowDrop (rdParent_RowDrop) event and not it's own rowDrop (rdChild_RowDrop) event, naturally because this is an embedded control we are specifying which event it needs to use with the onRowDrop tag.
Here is the tag for the rdChild grid as you can see we are specifying the OnRowDrop, OnItemDataBound and the OnPreRender events on the grid.
| <telerik:RadGrid ID="rdChild" runat="server" EnableEmbeddedSkins="False" GridLines="None" Skin="SunsetQ3" ShowHeader="False" OnRowDrop="rdChild_RowDrop" OnItemDataBound="rdChild_ItemDataBound" Width="440px" OnPreRender="rdChild_PreRender"> |
This issue just arose like I mentionned when we went from 2008 Q3 to 2009 Q1, this has been working since 2007.
Thanks for your attention
8 Answers, 1 is accepted
Testing our most 2009.1.527 version of RadGrid does not show any weird behavior under the described scenario. We are using two RadGrids, the second is inside the first's NestedViewTeamplate. The two grids' RowDrop events fire properly. Could you please give us some details as to the scenario in which you are using RadGrid.
If the problem persists, please consider opening a regular support ticket where you can, if possible, provide us with a small runnable project demonstrating the misbehavior. Once we can reproduce the problem, we will be able to better assist you on the matter.
Regards,
Veli
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
One of the things you mentionned in your post is you have your 2nd grid nested in NestedViewTeamplate, I do not have it in NestedViewTeamplate it is simply a control in one of the columns.
Thanks
Like I mentionned in my previous reply I was not using the NestedViewTeamplate but had my grid within a column of my parent grid, I was going down the route of the DetailTables but was unable to activate the drag and drop on the DetailTables.
After reading your post and you mentionning NestedViewTeamplate I went down that route and everything seems to be working now, the child grid is firing it's RowDrop event and not the parent RowDrop event.
I believe that dropping a grid in a column shouldn't cause that grid to fire any parent events though.
Thanks
I am glad you found a solution to your problem. Nevertheless, I tested RadGrid with a GridTemplateColumn and another RadGrid inside, and, again, my RowDrop events are firing correctly for both grids. If you need a solution to this scenario not working at your site, or if you experience similar problems again, please, do not hesitate to request assistance from Telerik support.
Good luck with your project.
Sincerely yours,
Veli
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Implementing hierarchy and row drag drop is no different than a flat RadGrid. You can find attached a simplified example with 2 levels.
All the best,
Veli
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
I have forgotten to attach the .cs class file containing the dummy data objects. You can find it attached now.
1. For three-level hierarchical grid, you would simply have another <DetailTables> collection inside the nested table:
<telerik:RadGrid> <MasterTableView> <DetailTables> <telerik:GridTableView> <DetailTables> <telerik:GridTableView> </telerik:GridTableView> </DetailTables> </telerik:GridTableView> </DetailTables> </MasterTableView></telerik:RadGrid>To get started with setting up your grid hierarchy structure, you can refer to this RadGrid online help article. The other articles in the same section will help you when diving deeper into customizing your hierarchy setup.
2. I am not quite sure I understand what you mean by Update Sort order in DB as user do drag and drop. If you need to implement sorting at the database level, you can easily override the default sorting behavior of RadGrid and implement a custom one.
3. The example you are referring to demonstrates the self-referencing hierarchy feature of RadGrid. In the example, the default expand/collapse button is hidden and custom buttons are inserted in the first cell of each parent row. You can try the approach locally by running the RadControl Demo application shipped with your RadControls distribution. The same approach can be used for regular parent-detail hierarchical grid and there would be no difference in the implementation details for hiding the expand column and inserting custom buttons.
4. I am afraid I also do not understand what you mean by Show Grid in same state as it was before drag and drop. Can you clarify.
All the best,
Veli
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.