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

Specific rows not editable in a editable RadGridView

2 Answers 80 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Peter Luth
Top achievements
Rank 1
Peter Luth asked on 28 Nov 2008, 10:24 AM
Hello,

I have bound my RadGridView to a my datasource with custom data objects. Some rows must not be edited by the user. What is the best way to make sure IsEditable is set to false on these rows?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Peter Luth
Top achievements
Rank 1
answered on 28 Nov 2008, 12:32 PM
I found the solution. I simply use the event CellBeginEdit and set e.Cancel to true if my DataBoundItem should not be editable.
0
Nick
Telerik team
answered on 01 Dec 2008, 08:53 AM
Hi Martin Bo,

Thank you for sharing your solution. We were going to suggest to iterate through the Rows collection as in this help topic and set all appropriate rows IsEditable to false. Your solution is fine as well.

Do not hesitate to contact me if you have more questions.

Best wishes,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Peter Luth
Top achievements
Rank 1
Answers by
Peter Luth
Top achievements
Rank 1
Nick
Telerik team
Share this question
or