I have a RadGrid and have enabled drag and drop but see it drags the whole row, what i am after is making 2 columns draggable within one row...is this possible? or can you only drag the whole row?
I have tried looking but couldnt find anything to help, so if anyone could point me at a demo or just let me know if it can be done that would be fantastic.
8 Answers, 1 is accepted
You can drag whole rows or whole columns (when using the columns reorder feature).
I am afraid you cannot drag cells (actually, this is what you are trying to do).
However, what you can do, is obtain a reference to the table cells inside the dragged rows and get only the cell values that you need. Afterwards you can apply some custom actions. The relevant client events that you can use are:
the Telerik team
Is there a way that upon "OnRowDragStarted" to change the visual appearance so that I am dragging an icon instead of an entire row. I will still be using the data from the entire row, but I don't visually want to see a row being dragged.
Also, if I have a scrollable RadGrid and I choose a row from the top and drag to a RadTree (which is located towards the bottom left of the RadGrid), I notice that the RadGrid scrolls. Is there a way that upon "OnRowDragStarted", I can "lock" the ability for the RadGrid to scroll and then upon "OnRowDropping" to "unlock" the ability for the RadGrid to scroll?
You can modify the appearance of the dragged RadGrid rows as in the example below.
As for the "scroll lock" question, you have to set AllowAutoScrollOnDragDrop="false" in ClientSettings.
the Telerik team
in Razor MVC i had to use this:
.Scrollable(scrollable => scrollable.Virtual(false))
We have requirements on column drag drop. user should be able to remove the specific column by drag and drop the column outside the grid.
I have tried this row drag and drop event.. but did not get the reference of column drag..
This is the critical. please help and let me know if you need more information.
Generally, dragging columns is enabled using the following property:
I'm afraid this requirement is not supported built-in but can be achieved if you use the keyup dropping event handler of the dragged element and determine whether it is outside or inside the grid.