I am using telerik rad grid , but i am unable to find the <telerik:GridDragDropColumn> tag.
MY grid code look like:
div style="float: left; padding: 0 6px 0 10px">
<h2 style="color: #9c3608">
<telerik:RadGrid runat="server" ID="grdPendingOrders" OnNeedDataSource="grdPendingOrders_NeedDataSource"
AllowPaging="True" Width="350px" OnRowDrop="grdPendingOrders_RowDrop" AllowMultiRowSelection="true"
<MasterTableView DataKeyNames="QuestionnairePK" TableLayout="Fixed">
<telerik:GridDragDropColumn HeaderStyle-Width="18px" Visible="false" /> --> i am unable to write this tag. its throwing error like 'Unknown server tag 'telerik:GridDragDropColumn'.
<ClientSettings AllowRowsDragDrop="True" AllowColumnsReorder="true" ReorderColumnsOnClient="true">
<Resizing AllowColumnResize="true" />
<Selecting AllowRowSelect="True" EnableDragToSelectRows="false" />
<ClientEvents OnRowDropping="onRowDropping" />
<Scrolling AllowScroll="true" UseStaticHeaders="true" />
<PagerStyle Mode="NumericPages" PageButtonCount="4" />
Thanks in advance
8 Answers, 1 is accepted
Could you please verify that the version of RadControls for ASP.NET AJAX you are using is Q2 2010 (version 2010.2.713) or later.
the Telerik team
As I have stated in my previous post, the GridDragDropColumn is introduced in Q2 2010 release, but the version you are using is Q1 2010, therefore you should upgrade to a later (Q2 2010+) version in order to use the column in question.
the Telerik team
This is exactly what I'm looking for and even if it takes some effort (compared to a canned implementation from the newest version) I'd love to deliver this for the end users who thus far haven't asked for drag-n-drop much but this time they have a screen where it really makes sense to implement drag-n-drop...
The RadGrid has always had drag-and-drop functionality, the only function of the GridDragDropColumn is to provide a visual handler that so the user knows they can drag the row. You can pretty much just add a TemplateColumn with that image in it and it will function pretty much the same way as the GridDragDropColumn does. The only difference would be that you can grab the entire row, where as when you use the GridDragDropColumn you can only grab the handler to move the rows.
I hope that helps.
For RadGrid versions prior to Q2 2010 that do not have the GridDragDropColumn, you can use the following workaround:
1. Create a GridTemplateColumn with an <img> element that has a CSS class of rgDrag:
2. Use RadGrid's client-side OnRowDragStarted event to cancel the action if you are not dragging by the drag handle:
3. Use RadGrid's ItemCreated event to register an onmousedown handler for RadGrid's data items:
4. Start the row drag from within the startRowDrag() function if the target of the event is the drag handle (identified by the rgDrag css class) :
That's it. You now have a drag-drop column that is used to drag grid items. Attaching a test page to demonstrate.
the Telerik team
in my current version of DNN 6 and Telerik Version 2011.2.915.35 (I think in any versions) you have to care about some details.
I used this way of drag-drop for more then one rows combined with a checkboxColumn.
If you are using it in 2 diferent modules in dotnetnuke you have to care about the naming of the functions or maybe naming of the grids.
however you have to be sure that you are calling the right functions in your different grids on the same page.
i.e. I renamed my functions like this "gridRowDragStarted_ModuleID_" + ModuleID
You only have to care about this if you have different modules with the same drag n drop functions on the same page and the functions are doing different stuff.
i.e. Iam using 2 different modules on one page. One is selecting only one row and another module has got a grid where you can select more then 1 row using a checkboxcolumn. Both grids are calling maybe the same functions (you dont know. You have to make the different functions unique!).
RadGrid.ClientSettings.ClientEvents.OnRowDragStarted = "gridRowDragStarted_ModuleID_" + this.ModuleId;
If you want to make it perfect you have to make this functions unique inside a module, too. Cause if you have a copy of the grid in the same module you will have the same moduleID and the problem occures again :-)
So take care about this case of problems.