This is a migrated thread and some comments may be shown as answers.

[Solved] Pasting from excel to a ReadOnly Grid

1 Answer 114 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Abdulrahman Omran
Top achievements
Rank 1
Abdulrahman Omran asked on 10 Feb 2011, 11:01 PM
Hi,

In my application I have a read-only grid. The cell values are only editable through activating a row which in turn will show a window with the fields from the selected row.

This is a business preference that i can't change. However, I'm trying to implement a paste from excel functionality but I found that in order for this to work the cells have to be editable.

Is there a way to work around this ?
i.e. i want the user to still be able to paste new rows but the rows shouldn't be editable afterward ( i mean existing rows and the rows that are just pasted from the clipboard).


Regards,
Abdul

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 11 Feb 2011, 09:52 AM
Hi Abdulrahman Omran,

You can try the following:

1. Do not make the grid readonly, e.g. leave IsReadOnly="False"
2. Subscribe to the BeginningEdit event of RadGridView and cancel it.
3. Your logic for showing RadWindow should stay the same

Now, you should be able to paste in RadGridView, but not edit the cells.


Kind regards,
Veselin Vasilev
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
Abdulrahman Omran
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or