
I just installed the Q2 today and I am very please that you are now supporting the clipboard while copying data from or to excel. Nevertheless, I didn't find a lot of information regarding these new functionalities (am I missing the documentation here, please provide if so).
My question is simple : Is there a quick way to copy / paste rows from excel to the gridview by creating new rows. In other words, we have hundreds of rows of data in excel and we need to import these, quickly, into the grid which has got exactly the same column definition (I am not talking about creating column, just rows).
I hope that you understand my question and would like to congratulate you guys, the telerik suite is pretty awsome and really fits our business requirments.
R.
8 Answers, 1 is accepted
If the underlying data collection is modifiable, the RadGridView should create the new rows automatically and place the data from the Clipboard in them.
Best wishes,Yavor Georgiev
the Telerik team

Thanks for answering that fast.
I mean if you can add new items to that data collection. If you bind the RadGridView to a Collection, the grid will automatically insert new rows when you press Ctrl + V. However, if you bind to an array (where you can't add new items), the RadGridView will only paste as many items as it can currently hold.
Sincerely yours,Yavor Georgiev
the Telerik team

Thanks.
Unfortunately, we still have not updated our documentation to include a help topic on copy and paste, but we are working on this right now. However, you can check out this blog post that demonstrates the copy/paste functionality, published shortly before the official release of the 2010 Q2 version of our controls..
Regards,Yavor Georgiev
the Telerik team

Mr Georgiev
I am afraid there is something I don't get here ... Let's take an easy example : I have one grid:
<
telerik:RadGridView x:Name="MyGrid" CanUserInsertRows="True">
</telerik:RadGridView>
And, on the other side, I have a collection of string binded to it :
public
ObservableCollection<string> myCollection = new ObservableCollection<string>();
public MainPage()
{
InitializeComponent();
MyGrid.ItemsSource =
this.myCollection;
}
So in excel, I have one column with strings :
String 1
String 2
String 3
When I copy these three cells and then paste them to the grid, there is popup asking me if I authorize silverlight to access my clipboard and then : nothing ... What am I doing wrong here ?
Thanks in advance,
Your example does not work, because the String type does not have a parameterless constructor and so we cannot add new rows. Please check out the attached project, which uses a custom type with a default parameterless constructor.
Kind regards,Yavor Georgiev
the Telerik team
