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

GridView prevent user from deleting rows

3 Answers 214 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Daniil
Top achievements
Rank 1
Daniil asked on 22 Jun 2010, 09:06 AM
Hello,

In certain cases I need to allow user to edit and delete rows, but in certain cases user can edit rows, but can not delete them

How can I disable deletion of rows?

Thank You

3 Answers, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 22 Jun 2010, 09:23 AM
Hello Daniil,

 You can handle the Deleting event in the RadGridView and set the Cancel property in the event arguments object to true whenever you need to cancel deletion.

Best wishes,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Arun
Top achievements
Rank 1
answered on 19 Nov 2010, 11:27 AM
I am not able to get the row datacontext by using deleting event. The row is always returned as null.

How to get the row object when the delete button is pressed
0
Yavor Georgiev
Telerik team
answered on 19 Nov 2010, 12:15 PM
Hi Arun,

 I'm sorry, but I am a little confused? How are you accessing the row to be deleted from the Deleting event? It only exposes an array of the data items to be removed. Could you please post a code snippet?

Kind regards,
Yavor Georgiev
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
GridView
Asked by
Daniil
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Arun
Top achievements
Rank 1
Share this question
or