
Michael Dunbar
Top achievements
Rank 2
Michael Dunbar
asked on 15 May 2009, 09:02 AM
Is it possible to change the view of the row when you drag it? By default you get to see a full floating row when you start to drag it. I would like to change this to an icon, basically the way Windows Explorer works when you drag a row from the details view.
I'm looking at the row drag started client side event to achieve this but not sure if that is correct or if indeed this is possible?
I'm looking at the row drag started client side event to achieve this but not sure if that is correct or if indeed this is possible?
7 Answers, 1 is accepted
0

Michael Dunbar
Top achievements
Rank 2
answered on 15 May 2009, 10:19 AM
Anyone? Is this too generic a question?
0

Michael Dunbar
Top achievements
Rank 2
answered on 18 May 2009, 12:27 PM
I take it, due to lack of response, that my question is either not possible to achieve or that you do not understand the question?
0
Accepted
Hello Michael Dunbar,
This scenario is possible and in order to achieve it you need to implement the following steps:
1. In javascript create a global flag variable, e.g. flagDragStarted, and set it to false.
2. Attach an event handler to the OnRowDragStarted event of the grid and in it set the above flag to true.
3. Attach an event handler to the mouse move event of the grid, directly in its mark-up as follows:
4. In the mouse move event, you can access the dom element that represents the dragged row with the following lines of code:
Having the dom element you can manipulate it as you see fit, by changing its html.
However, do keep in mind that the grid's client-side _draggedItem property is not public and is intended for internal use only.
I hope this information helps.
Best Regards,
Tsvetoslav
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.
This scenario is possible and in order to achieve it you need to implement the following steps:
1. In javascript create a global flag variable, e.g. flagDragStarted, and set it to false.
2. Attach an event handler to the OnRowDragStarted event of the grid and in it set the above flag to true.
3. Attach an event handler to the mouse move event of the grid, directly in its mark-up as follows:
<telerik:RadGrid ID="RadGrid1" runat="server" onmousemove="javascript:return onMouseMove();".....> |
.... |
</telerik:RadGrid> |
4. In the mouse move event, you can access the dom element that represents the dragged row with the following lines of code:
if (flagDragStarted) |
{ |
var grid = $find('<%=RadGrid1.ClientID %>'); |
var draggedItemHtmlElement = grid._draggedRow; |
} |
Having the dom element you can manipulate it as you see fit, by changing its html.
However, do keep in mind that the grid's client-side _draggedItem property is not public and is intended for internal use only.
I hope this information helps.
Best Regards,
Tsvetoslav
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.
0

Michael Dunbar
Top achievements
Rank 2
answered on 19 May 2009, 10:14 AM
Great thank you.
0

Prasanna
Top achievements
Rank 1
answered on 28 Dec 2012, 12:57 PM
Hi,
The above code doesn't work for me.draggedRow property returns null.
Am using Telerik 2011 Version
Please help me........................
Thanks,
Prasanna
The above code doesn't work for me.draggedRow property returns null.
Am using Telerik 2011 Version
Please help me........................
Thanks,
Prasanna
0
Hello Michael,
First of all, do make sure that you have ClientSettings.AllowRowsDragDrop set to true for the grid.
Then, you should be accessing the dragged row as follows:
Do note that there is an underscore at the beginning of the property accessors, it is _draggedRow and not just draggedRow.
Hope it helps.
Greetings, Tsvetoslav
the Telerik team
First of all, do make sure that you have ClientSettings.AllowRowsDragDrop set to true for the grid.
Then, you should be accessing the dragged row as follows:
var
draggedRow = $find(
"<%= RadGrid1.ClientID %>"
)._draggedRow;
Do note that there is an underscore at the beginning of the property accessors, it is _draggedRow and not just draggedRow.
Hope it helps.
Greetings, Tsvetoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Prasanna
Top achievements
Rank 1
answered on 31 Dec 2012, 09:56 AM
Thank you ..... Its Works well