I want to Move Row (UP and Down) within RadGridView like Column, as effect some Id type column data should be rearrange within RadGridView.
I am Finding it soon.
Thanks
24 Answers, 1 is accepted
Please check the attached project for more info.
Kind regards,
Vlad
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.
Let you know, what is happing........
Thanks you very much...
Thanks,
Manas
Now it is working fine with simple grid, but when I am trying to implement it on Hierarchy of grid then problem is there. For create hierarchy of grid I have used bellow direction.
Declare it on page Load
//For Hierarchy of grid
this.gridLesson.TableDefinition.PreviewDataRecordCreate += this.MasterTableDefinition_PreviewDataRowCreate;
Now Create “MasterTableDefinition_PreviewDataRowCreate” event.
//Hierarchy Grid Load
private void MasterTableDefinition_PreviewDataRowCreate(object sender, DataRecordCreateEventArgs e)
{
e.IsExpandableRecord = true;
GridViewTableDefinition detailDefinition = new GridViewTableDefinition();
detailDefinition.Relation = new PropertyRelation("Files");
e.ChildTableDefinitions.Add(detailDefinition);
}
Can you help me for Grid Row Drag and Drop on that sitution.
Thanks,
Manas
It is actually quite difficult to figure out what has gone wrong without more information. Nevertheless, I am sending you an updated version of the original files in rowdragdrop.zip. GridViewRowDragDropManager now works better with hiearachy and also the ReorderRequestedEventArgs provides more information that can be useful in hierarchy scenerios.
Could you try to inforporate the updated files in your solution and see if the problems that you have reported are fixed. If not, may I ask oyu to send us your application so that we can take a closer look at the problem? You can send us files by opening a support ticket.
Hope this helps.
Best wishes,
Milan
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.
I am not getting any link for updated version of the original files in rowdragdrop.zip. I hope, that would be very helpful for me.
kindly send me updated version of the original files in rowdragdrop.zip link.
Thanks,
Manas
Here is the updated project that I have promised. Only two files are changed (GridViewRowDragDropManager.cs and ReorderRequestedEventArgs.cs) and one new file is added (GridViewRowExtensions.cs).
Sorry for the inconvenience.
Greetings,
Milan
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.
Thanks for your excellent support.
Regards,
Manas
Thanks Milan,
Now Grid row drag and drop is working fine with hierarchy grid. But I am facing another problem, that is we have applied custom row style link RowStyle="{StaticResource CustomRowStyle}" on Grid then I cannot select any row to copy paste from Excel, which one was working previously.
May you help regarding that quickly?
Regards,
Manas
Unfortunately the copy to clipboard functionality only works for the WPF version of RadGridView due to limitations of the Silverlight plugin.
Sorry for this inconvenience.
Best wishes,
Milan
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.
Sorry for little misunderstanding here, already I have developed Copy to Clipart from RadGridView in Silver light and paste also, now problem is when I have applied Row Style (RowStyle="{StaticResource CustomRowStyle}") on Hierarchical RadGridView for Drag and Drop Row within Grid then I can’t select a full row.
So, right now I can’t select full row to copy paste. I hope, now you can understand, what my goal is.
Regards,
Manas
The selection mechanism should be working. If you take a look at the SelectedItems collection you will see that items are indeed selected. The actual problem is that the custom style does not include visual styles that respond to the different row states. I am sending you the style and template of GridViewRow as a reference.
Just a quick reminder - whenever you select an item in a child grid this selection will not be reflected in the SelectedItems of the parent grid but only in the SelectedItems of the child grid itself.
Sincerely yours,
Milan
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.
Since DataRecord is going away, what's the best way to get the row index?
You can use Items property to get desired data item index.
All the best,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
idx = gridView.Items.IndexOf(aRow);
Not working for me either, I'm afraid.
if aRow is some of your business objects there should be no problems.
Sincerely yours,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
oldIndex = gridView.Items.IndexOf(originalRow.DataItem);
which works nicely. Thanks!
-p
Hi Vlad,
I have experimented with your example of moving rows within a GridView and it all works fantastically.
My question is, will this ever be provided OOB by the GridView in a future release?
There is a lot of boiler plate code involved in your example that ideally should be abstracted outside of my application (like how DragDrop works).
Kind regards,
James.
Since now our Drag & Drop framework is available for both Silverlight and WPF this is preferred way. Please check this demo for more info:
http://demos.telerik.com/silverlight/beta/#DragAndDrop/TreeToGrid
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I have a particular requirement wherein I have a Radgridview which is populated with some data and each row has a button. Now on click of this button I want to select the corresponding row of the RadGridView and iterate through each cell.
Thanks,
Tejas
You can get the row from the button click event handler using our powerful extension methods:
var row = ((Button)sender).ParentOfType<GridViewRow>();
Kind regards,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Using Q3 SP1 allows you to achieve similar functionality using DragDrop manager. Attached you will find sample WPF application demonstrating row reorder using DragDrop Manager.
For more information about RadDragDrop Manager you can check your Examples and Documentation.
Hope this helps.
All the best,
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Can I get this example but for Silverlight 4 / Telerik 2010.2.0714.1040?
The WPF example has SL unusable code
GridViewRow row = this.GetRowFromHitTest(this.RadGridView, e.Options.CurrentDragPoint);
HitTestResult result = VisualTreeHelper.HitTest(subTree, intesectionPoint);Thanks,
Ray
I have modified the project to make it work in silverlight. Please have a look at the attachment and let me know if you need any further assistance.
Best wishes,
Tsvyatko
the Telerik team
